OpenAITextEmbedder Parameters

Check the init and runtime parameters you can pass for OpenAITextEmbedder.

YAML Init Parameters

These are the parameters you can specify in pipeline YAML:

Parameter

Type

Possible values

Description

api_key

Secret

Default: {"type": "env_var", "env_vars": ["OPENAI_API_KEY"], "strict": False}

The OpenAI API key.
Required.

model

String

Default: text-embedding-ada-002

The name of the model to use.
Optional.

dimensions

Integer

Default: None

The number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
Optional.

api_base_url

String

Default: None

Overrides the default base URL for all HTTP requests.
Optional.

organization

String

Default: None

The Organization ID. For more information, see OpenAI's production best practices. Optional.

prefix

String

Default: "" (empty string)

A string to add at the beginning of each text. Required.

suffix

String

Default: "" (empty string)

A string to add at the end of each text.
Required.


REST API Runtime Parameters

These are the runtime parameters you can pass in the body of the request to the Search endpoint: