Skip to content

Commit 7edfe7b

Browse files
committed
add another example
1 parent df7daca commit 7edfe7b

File tree

3 files changed

+129
-89
lines changed

3 files changed

+129
-89
lines changed

pai-hello/main.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from pydantic_ai import Agent
2+
3+
# import logfire
4+
# logfire.configure(service_name='pai-hello')
5+
# logfire.instrument_pydantic_ai()
6+
7+
agent = Agent(
8+
'openai:gpt-4o',
9+
system_prompt='Be concise, reply with one sentence.',
10+
)
11+
12+
result = agent.run_sync('Where does "hello world" come from?')
13+
print(result.output)

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ dependencies = [
99
"devtools>=0.12.2",
1010
"fastapi>=0.115.14",
1111
"logfire[asyncpg,fastapi,httpx]>=3.21.1",
12-
"pydantic-ai>=0.3.4",
12+
"pydantic-ai>=0.3.6",
1313
]
1414

1515
[dependency-groups]

0 commit comments

Comments
 (0)