OpenAI

Azure OpenAI examples for runs, storage, knowledge, structured output, and tools.

ExampleDescription
Azure BasicCreate a minimal AzureOpenAI agent and print sync, async, and streamed responses.
DbPersist AzureOpenAI agent sessions in Postgres and add history to follow-up runs.
KnowledgeLoad a recipe PDF into PgVector with AzureOpenAIEmbedder and query it from an agent.
Azure Structured OutputReturn a typed MovieScript from an AzureOpenAI agent with output_schema.
Tool UseStream an AzureOpenAI agent's response as it calls WebSearchTools.