Skip to content

Commit 36b663d

Browse files
authored
Merge pull request #20 from ppl-ai/sathvik/test-pr
updated contributing
2 parents 52c20a3 + d6223c0 commit 36b663d

File tree

3 files changed

+42
-109
lines changed

3 files changed

+42
-109
lines changed

.github/pull_request_template.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Brief description of your contribution
44
## Type of Contribution
55
- [ ] Example Tutorial
66
- [ ] Showcase Project
7+
- [ ] Article/Integration Guide
78
- [ ] Documentation Update
89
- [ ] Bug Fix
910
- [ ] Other (please describe)

CONTRIBUTING.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,17 @@ Thank you for your interest in contributing to our API Cookbook! We welcome high
44

55
## Structure
66

7-
This cookbook contains two main sections:
7+
This cookbook contains three main sections:
88

99
### 1. **Examples** (`/docs/examples/`)
1010
Step-by-step tutorials and example implementations that teach specific concepts or solve common use cases.
1111

1212
### 2. **Showcase** (`/docs/showcase/`)
1313
Community-built projects that demonstrate real-world applications of the Sonar API.
1414

15+
### 3. **Articles** (`/docs/articles/`)
16+
In-depth integration guides and advanced implementation tutorials for complex use cases and integrations with other tools.
17+
1518
## Contributing Guidelines
1619

1720
### What We're Looking For
@@ -91,6 +94,15 @@ Any known limitations or considerations users should be aware of.
9194
4. Include screenshots or demos if applicable
9295
5. Submit a pull request
9396

97+
### For Articles
98+
99+
1. Fork this repository
100+
2. Create a new directory under `/docs/articles/your-article-name/`
101+
3. Add your `README.mdx` file following the structure above
102+
4. Focus on advanced implementations, integrations, or complex patterns
103+
5. Include comprehensive code examples and explanations
104+
6. Submit a pull request
105+
94106
## Pull Request Template
95107

96108
When submitting a PR, please use this template:
@@ -102,6 +114,7 @@ Brief description of your contribution
102114
## Type of Contribution
103115
- [ ] Example Tutorial
104116
- [ ] Showcase Project
117+
- [ ] Article/Integration Guide
105118

106119
## Checklist
107120
- [ ] My code follows the cookbook's style guidelines

docs/index.mdx

Lines changed: 27 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,131 +1,50 @@
11
---
22
slug: /
33
title: Perplexity Sonar API Cookbook
4-
description: A comprehensive collection of practical applications, tutorials, and integration guides for Perplexity's Sonar API
4+
description: A collection of practical examples and guides for building with Perplexity's Sonar API
55
keywords: [perplexity, sonar, api, cookbook, examples, tutorials]
66
---
77

8-
**Build with the best AI answer engine.** A comprehensive collection of practical applications, tutorials, and integration guides built with [**Perplexity's Sonar API**](https://sonar.perplexity.ai/) - the fastest, most cost-effective grounded search APIs with unparalleled real-time, web-wide research and Q&A capabilities.
8+
# Perplexity Sonar API Cookbook
99

10-
## 🌟 Why Sonar API?
10+
A collection of practical examples and guides for building with [**Perplexity's Sonar API**](https://sonar.perplexity.ai/) - the fastest, most cost-effective AI answer engine with real-time search capabilities.
1111

12-
Based on [Perplexity's Sonar platform](https://sonar.perplexity.ai/), this cookbook demonstrates how to leverage:
12+
## Quick Start
1313

14-
- **⚡ Fastest Performance** - Outperforms the competition with industry-leading speed
15-
- **💰 Most Affordable** - Sonar's grounding request pricing beats the competition
16-
- **🔒 Private & Secure** - No LLM training on your data
17-
- **🌐 Real-time Search** - Unparalleled web-wide research capabilities
18-
- **📚 Multiple Models** - From lightweight Sonar to premier Sonar Pro and Deep Research
14+
To get started with any project in this cookbook:
1915

20-
## 🚀 Getting Started
16+
1. **Browse examples** - Find the use case that matches your needs
17+
2. **Follow the guide** - Each example includes complete setup instructions
18+
3. **Get the code** - Full implementations are available in our [GitHub repository](https://github.com/ppl-ai/api-cookbook)
19+
4. **Build and customize** - Use the examples as starting points for your projects
2120

22-
To use any project in this cookbook, you'll need:
21+
## What's Inside
2322

24-
1. **Perplexity API Key** - [Get started here](https://docs.perplexity.ai/home)
25-
2. **Python 3.7+** - For running the examples
26-
3. **Basic familiarity** with REST APIs and Python
23+
### [Examples](/examples)
24+
Ready-to-run projects that demonstrate specific use cases and implementation patterns.
2725

28-
Each example includes its own setup guide and documentation.
26+
### [Showcase](/showcase)
27+
Community-built applications that demonstrate real-world implementations of the Sonar API.
2928

30-
---
31-
32-
## 🔧 Examples
33-
34-
### [🔍 Fact Checker CLI](cookbook/examples/fact-checker-cli/)
35-
Command-line tool that analyzes claims and articles for factual accuracy using Sonar's grounded search.
36-
- Structured claim analysis with confidence ratings
37-
- Source citation tracking and verification
38-
- JSON output for automation workflows
39-
- Professional fact-checking capabilities
40-
41-
### [🤖 Daily Knowledge Bot](cookbook/examples/daily-knowledge-bot/)
42-
Automated system delivering interesting facts using Perplexity's AI-powered research.
43-
- Topic rotation and scheduling support
44-
- Persistent storage and configuration
45-
- Educational content generation
46-
- Customizable knowledge domains
47-
48-
### [🏥 Disease Information App](cookbook/examples/disease-qa/)
49-
Interactive web application providing structured medical information with Sonar's real-time search.
50-
- Browser-based interactive interface
51-
- Structured knowledge cards with citations
52-
- Medical information lookup and research
53-
- Standalone deployment ready
54-
55-
### [📚 Academic Research Finder](cookbook/examples/research-finder/)
56-
CLI tool for discovering and summarizing academic literature with Sonar's research capabilities.
57-
- Academic source prioritization
58-
- Citation extraction with DOI tracking
59-
- Research workflow optimization
60-
- Literature review automation
61-
62-
## 📖 Integration Guides
63-
64-
In-depth tutorials for advanced implementations:
65-
66-
### [🔗 OpenAI Agents Integration](cookbook/articles/openai-agents-integration/)
67-
Complete guide for integrating Sonar API with OpenAI Agents SDK.
68-
- Custom client configuration patterns
69-
- Async integration examples
70-
- Function tool implementations
71-
- Production deployment strategies
72-
73-
### [🧠 Memory Management](cookbook/articles/memory-management/)
74-
Advanced conversation memory solutions using LlamaIndex with Sonar.
75-
- Token-aware summarization techniques
76-
- Vector-based persistence systems
77-
- Cross-session continuity patterns
78-
- Production-scalable architectures
79-
80-
## 🎯 Use Cases Covered
81-
82-
This cookbook provides solutions for:
83-
84-
- **🔍 Content Verification** - Fact-checking for journalism and research
85-
- **📚 Educational Tools** - Knowledge distribution and learning systems
86-
- **🏥 Information Lookup** - Medical, academic, and professional research
87-
- **🤖 Conversational AI** - Context-aware chatbots with long-term memory
88-
- **🔗 API Integration** - Connecting Sonar with existing tools and workflows
89-
- **📊 Research Automation** - Literature reviews and data synthesis
90-
91-
## 🏢 Trusted by Industry Leaders
92-
93-
Sonar powers products for companies like:
94-
- **Zoom** - AI Companion 2.0 supercharged with Perplexity's API
95-
- **Copy.ai** - 8-hour research time savings per rep, 20% throughput increase
96-
- **Doximity** - Up-to-the-minute clinical answers for physicians
97-
98-
*Source: [Sonar customer stories](https://sonar.perplexity.ai/)*
99-
100-
## 🌐 Sonar API Models
101-
102-
Choose the right model for your use case:
103-
104-
| Model | Best For | Features |
105-
|-------|----------|----------|
106-
| **Sonar** | Quick lookups | Lightweight, fast, affordable |
107-
| **Sonar Pro** | Complex research | Advanced queries, follow-ups |
108-
| **Reasoning Pro** | Deep analysis | DeepSeek R1 powered reasoning |
109-
| **Deep Research** | Comprehensive reports | Expert-level research synthesis |
110-
111-
*Learn more: [Sonar API Documentation](https://docs.perplexity.ai/home)*
29+
### [Integration Guides](/articles)
30+
In-depth tutorials for advanced implementations and integrations with other tools.
11231

113-
## 🤝 Contributing
32+
> **Note**: All complete code examples, scripts, and project files can be found in our [GitHub repository](https://github.com/ppl-ai/api-cookbook). The documentation here provides guides and explanations, while the repository contains the full runnable implementations.
11433
115-
We welcome contributions to expand this cookbook! Whether you want to:
34+
## Contributing
11635

117-
- 🐛 Fix bugs in existing examples
118-
- ✨ Add new features to current tools
119-
- 🆕 Contribute entirely new Sonar API applications
120-
- 📚 Improve documentation and tutorials
36+
Have a project built with Sonar API? We'd love to feature it! Check our [Contributing Guidelines](https://github.com/ppl-ai/api-cookbook/blob/main/CONTRIBUTING.md) to learn how to:
12137

122-
Please check our [Contributing Guidelines](https://github.com/ppl-ai/api-cookbook/blob/main/CONTRIBUTING.md) for details.
38+
- Submit example tutorials
39+
- Add your project to the showcase
40+
- Improve existing content
12341

124-
## 📄 License
42+
## Resources
12543

126-
This project is licensed under the [MIT License](https://github.com/ppl-ai/api-cookbook/blob/main/LICENSE).
44+
- [Sonar API Documentation](https://docs.perplexity.ai/home)
45+
- [API Playground](https://perplexity.ai/account/api/playground)
46+
- [GitHub Repository](https://github.com/ppl-ai/api-cookbook)
12747

12848
---
12949

130-
**Maintained by the Perplexity community**
131-
*Powered by [Sonar API](https://sonar.perplexity.ai/) - Where Knowledge Begins*
50+
*Maintained by the Perplexity community*

0 commit comments

Comments
 (0)