开源推荐
morning
GitHub 热门项目:pydantic-ai
摘要
GitHub项目:pydantic-ai 仓库地址:https://github.com/pydantic/pydantic-ai Stars:19148 | 作者:pydantic 项目描述:AI Agent Framework, the Pydantic way ================================================== README 内容: GenA...
the
pydantic
Pydantic
and
https
dev
Python
agent
Validation
use
2026-08-09
1 阅读
约4分钟阅读
GitHub Trending
字号:
GitHub 项目:pydantic-ai
仓库地址:https://github.com/pydantic/pydantic-ai
星级:19148 | 作者:pydantic
项目描述:AI代理框架,Pydantic方式
===================================================
自述文件内容:
---
**文档**:[ai.pydantic.dev](https://ai.pydantic.dev/)
---
### Pydantic AI 是一个 Python 代理框架,旨在帮助您快速、自信、轻松地使用生成式 AI 构建生产级应用程序和工作流程。
FastAPI 通过提供创新且符合人体工程学的设计,建立在 [Pydantic Validation](https://docs.pydantic.dev) 和现代 Python 功能(如类型提示)的基础上,彻底改变了 Web 开发。
然而,尽管几乎每个 Python 代理框架和 LLM 库都使用 Pydantic Validation,但当我们开始在 [Pydantic Logfire](https://pydantic.dev/logfire) 中使用 LLM 时,我们找不到任何给我们同样感觉的东西。
我们构建 Pydantic AI 的目的很简单:将 FastAPI 的感觉带入 GenAI 应用程序和代理开发中。
## 为什么使用 Pydantic AI
1. **由 Pydantic 团队构建**:
[Pydantic Validation](https://docs.pydantic.dev/latest/) 是 OpenAI SDK、Google ADK、Anthropic SDK、LangChain、LlamaIndex、AutoGPT、Transformers、CrewAI、Instructor 等的验证层。 _当你可以直接找到源头时为什么要使用导数?_ :smiley:
2. **与模型无关**:
支持几乎所有[模型](https://ai.pydantic.dev/models/overview)和提供商:OpenAI、Anthropic、Gemini、DeepSeek、Grok、Cohere、Mistral 和 Perplexity; Azure AI Foundry、Amazon Bedrock、Google Cloud、Ollama、LiteLLM、Groq、OpenRouter、Together AI、Fireworks AI、Cerebras、Hugging Face、GitHub、Heroku、Vercel、Nebius、OVHcloud、阿里云、SambaNova、Snowflake Cortex 和 Z.AI。如果你最喜欢的模特
这篇文章对您有帮助吗?
订阅66必读
每日精选科技资讯,直达你的邮箱