File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -252,15 +252,16 @@ print(Runner.run_sync(agent, "Recursion haiku.").final_output)
252
252
** Comparing the 3 approaches**
253
253
254
254
| Strategy | Code Touchpoints | Best For |
255
- | ----------| -----------------| ----------|
255
+ | : ----------| : -----------------| : ----------|
256
256
| ** Global Client** via ` set_default_openai_client ` | One-time setup; agents need only model names | Whole app uses Portkey; simplest migration |
257
257
| ** ModelProvider in RunConfig** | Add a provider + pass ` run_config ` | Toggle Portkey per run; A/B tests, staged rollouts |
258
258
| ** Explicit Model per Agent** | Specify ` OpenAIChatCompletionsModel ` in agent | Mixed fleet: each agent can talk to a different provider |
259
259
260
- <Accordion title = " End-to-End Example: Research Agent with Tools" >
261
- Here's a more comprehensive agent that can use tools to perform tasks:
260
+ ## End-to-End Example
262
261
263
- ``` python
262
+ ** Research Agent with Tools** : Here's a more comprehensive agent that can use tools to perform tasks.
263
+
264
+ ``` python [expandable]
264
265
from agents import Agent, Runner, Tool, set_default_openai_client
265
266
from openai import AsyncOpenAI
266
267
from portkey_ai import PORTKEY_GATEWAY_URL , createHeaders
@@ -325,7 +326,8 @@ print(result.final_output)
325
326
```
326
327
327
328
Visit your Portkey dashboard to see the complete execution flow visualized!
328
- </Accordion >
329
+
330
+ ---
329
331
330
332
## Production Features
331
333
You can’t perform that action at this time.
0 commit comments