openai_embeddings
Generates vector embeddings to represent input text, using the OpenAI API.
# Config fields, showing default values
label: ""
openai_embeddings:
server_address: https://api.openai.com/v1
api_key: "" # No default (required)
model: text-embedding-3-large # No default (required)
text_mapping: "" # No default (optional)
This processor sends text strings to the OpenAI API, which generates vector embeddings. By default, the processor submits the entire payload of each message as a string, unless you use the text_mapping configuration field to customize it.
To learn more about vector embeddings, see the OpenAI API documentation.
Fields
api_key
The API key for OpenAI API.
|
This field contains sensitive information that usually shouldn’t be added to a configuration directly. For more information, see Manage Secrets before adding it to your configuration. |
Type: string
dimensions
The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
Type: int
model
The name of the OpenAI model to use.
Type: string
# Examples:
model: text-embedding-3-large
# ---
model: text-embedding-3-small
# ---
model: text-embedding-ada-002
server_address
The Open API endpoint that the processor sends requests to. Update the default value to use another OpenAI compatible service.
Type: string
Default: https://api.openai.com/v1