Skip to main content

Code

knowledge.py
Select a text-generation model with function-calling support for this example.

Usage

1

Set up your virtual environment

2

Export environment variables

Select an available text-generation model ID from the Nebius model-list API. PgVector uses OpenAIEmbedder by default, so this example also requires an OpenAI API key.
3

Install dependencies

4

Run PgVector

5

Run Agent

Save the code above as knowledge.py, then run: