Skip to main content
knowledge.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export environment variables

4

Run PgVector

5

Configure Azure deployments

Confirm that AZURE_OPENAI_DEPLOYMENT and AZURE_EMBEDDER_DEPLOYMENT refer to deployed gpt-5.2 and text-embedding-3-small resources. Azure API calls use deployment names rather than model names. See Azure OpenAI deployment setup.
6

Run the example

Save the code above as knowledge.py, then run:
Full source: cookbook/90_models/azure/openai/knowledge.py