File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -119,18 +119,21 @@ export PYDANTIC_AI_GATEWAY_API_KEY="YOUR_PYDANTIC_AI_GATEWAY_API_KEY"
119119
120120You 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
You can’t perform that action at this time.
0 commit comments