Documentation IndexFetch the complete documentation index at: /docs/llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
PydanticAI と Phaseo で型付きの Python エージェントを構築します。
https://api.phaseo.app/v1
OpenAIProvider
OpenAIChatModel
pip install "pydantic-ai-slim[openai]"
import os from pydantic_ai import Agent from pydantic_ai.models.openai import OpenAIChatModel from pydantic_ai.providers.openai import OpenAIProvider model = OpenAIChatModel( "openai/gpt-6-astra", provider=OpenAIProvider( api_key=os.environ["PHASEO_API_KEY"], base_url="https://api.phaseo.app/v1", ), ) agent = Agent(model, system_prompt="Answer concisely.") result = agent.run_sync("Reply with only: ok") print(result.output)
ok
phaseo:apply_patch
このページは役に立ちましたか?