Pydantic AI
Pydantic AI: API விசை auth ஆக MCPToolset, ஏஜென்ட் toolsets இல் சேர்க்கப்படுகிறது.
- API விசை (Bearer)
- OAuth உள்நுழைவு
ஏஜென்ட் குறியீடு
பரிந்துரைக்கப்படுகிறதுimport asyncio, os
from pydantic_ai import Agent
from pydantic_ai.mcp import MCPToolset
toolset = MCPToolset("https://aicharged.io/api/v1/mcp", auth=os.environ["AICHARGED_API_KEY"])
agent = Agent("openai:gpt-6.1-sol", toolsets=[toolset])
async def main():
result = await agent.run("List my recent aicharged.io runs")
print(result.output)
asyncio.run(main())
தொகுப்பை நிறுவவும்
pip install pydantic-ai