Skip to content

Commit f2a0687

Browse files
committed
include hello world in the same code block
1 parent 8d8d8fe commit f2a0687

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

docs/gateway.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -119,18 +119,21 @@ export PYDANTIC_AI_GATEWAY_API_KEY="YOUR_PYDANTIC_AI_GATEWAY_API_KEY"
119119

120120
You can access multiple models with the same API key, as shown in the code snippet below.
121121

122-
```python {title="hello_world.py"}
123-
from pydantic_ai import Agent
122+
=== "Hello World"
124123

125-
agent = Agent('gateway/openai:gpt-5')
124+
```python {title="hello_world.py"}
125+
from pydantic_ai import Agent
126126

127-
result = agent.run_sync('Where does "hello world" come from?')
128-
print(result.output)
129-
"""
130-
The first known use of "hello, world" was in a 1974 textbook about the C programming language.
131-
"""
132-
```
133-
=== "Passing API Key Directly"
127+
agent = Agent('gateway/openai:gpt-5')
128+
129+
result = agent.run_sync('Where does "hello world" come from?')
130+
print(result.output)
131+
"""
132+
The first known use of "hello, world" was in a 1974 textbook about the C programming language.
133+
"""
134+
```
135+
136+
=== "Passing API Key directly"
134137

135138
Pass your API key directly using the provider:
136139

0 commit comments

Comments
 (0)