Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/openai_agents/getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ python -m venv venv
# On macOS/Linux:
source venv/bin/activate
# On Windows:
# venv\Scripts\activate
venv\Scripts\activate
```

### Install Dependencies
Expand All @@ -62,6 +62,18 @@ pip install -r requirements.txt

**Durable Task Scheduler is the preferred backend** for this integration as it provides enhanced performance, better observability, and simplified local development. While not a hard requirement, it's strongly recommended for production workloads.

IMPORTANT: Ensure your function app is using the *preview* extension bundle version 4.34.0 or higher by specifying it in `host.json`:

```json
{
"version": "2.0",
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.34.0, 5.0.0)"
}
}
```

There are two ways to configure the backend locally:

#### Using the Emulator (Recommended)
Expand Down
2 changes: 1 addition & 1 deletion samples-v2/openai_agents/basic/hello_world.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def main():
)

result = Runner.run_sync(agent, "Tell me about recursion in programming.")
return result.final_output;
return result.final_output
# Function calls itself,
# Looping in smaller pieces,
# Endless by design.
2 changes: 1 addition & 1 deletion samples-v2/openai_agents/host.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
},
"extensionBundle": {
"id": "Microsoft.Azure.Functions.ExtensionBundle.Preview",
"version": "[4.29.0, 5.0.0)"
"version": "[4.34.0, 5.0.0)"
}
}
4 changes: 3 additions & 1 deletion samples-v2/openai_agents/local.settings.json.template
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@
"FUNCTIONS_WORKER_RUNTIME": "python",
"AZURE_OPENAI_ENDPOINT": "https://your-openai-service.openai.azure.com/",
"AZURE_OPENAI_DEPLOYMENT": "your-gpt-deployment-name",
"AZURE_OPENAI_API_VERSION": "2025-03-01-preview"
"AZURE_OPENAI_API_VERSION": "2025-03-01-preview",
"DURABLE_TASK_SCHEDULER_CONNECTION_STRING": "http://localhost:8080;Authentication=None;",
"TASKHUB": "default"
}
}