- Notifications
You must be signed in to change notification settings - Fork0
X-Zero-L/pydantic-ai-deep-research
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
A toy project reimplementingopen_deep_research withpydantic-ai. All code logic and prompts are from the original project - I'm just playing around and learning
⚠️ This is just for fun and learning! If you need something reliable, please use the original project.
This project usesuv as the package manager. Simply run:
uv sync
You'll need these API keys:
- Tavily API key (required for web search)
- Choose at least one of these:
- OpenAI API key (if using OpenAI as provider)
- Anthropic API key (if using Anthropic as provider)
Copy
.env.example
to.env
, configure your settings:
# RequiredTAVILY_API_KEY=your-tavily-key# Choose your providers and fill corresponding API keysPLANNER_PROVIDER=openai# or anthropicWRITER_PROVIDER=anthropic# or openai# If using OpenAIOPENAI_API_KEY=sk-xxxOPENAI_BASE_URL=# optional, default is official API# If using AnthropicANTHROPIC_API_KEY=xxxANTHROPIC_BASE_URL=# optional# Optional settingsPLANNER_MODEL=o3-mini# model for planningWRITER_MODEL=claude-3.5-sonnet# model for writingNUMBER_OF_QUERIES=3# searches per sectionMAX_SEARCH_DEPTH=2# max research iterationsMAX_RETRIES=3# API call retriesREPORT_STRUCTURE=# custom report template
- Run it:
python cli.py"your topic"
Here's what happens when you run it:
All operations are logged tologfire, where you can track the execution flow:
The logs show:
- Search queries generation
- Web search operations
- Section writing progress
- Model API calls
Well... pretty much everything 😂
- Quality is totally unpredictable
- Error handling is minimal
- Code is messy
- Test coverage? What's that?
Huge thanks toopen_deep_research! This is just a learning exercise based on their amazing work.
MIT (do whatever you want, but don't blame me if it breaks 😉)
About
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.