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:

ParameterTypePossible valuesDescription
api_keySecretDefault: {"type": "env_var", "env_vars": ["OPENAI_API_KEY"], "strict": False}The OpenAI API key.
Required.
modelStringDefault: text-embedding-ada-002The name of the model to use.
Optional.
dimensionsIntegerDefault: NoneThe number of dimensions the resulting output embeddings should have. Only supported in text-embedding-3 and later models.
Optional.
api_base_urlStringDefault: NoneOverrides the default base URL for all HTTP requests.
Optional.
organizationStringDefault: NoneThe Organization ID. For more information, see OpenAI's production best practices. Optional.
prefixStringDefault: "" (empty string)A string to add at the beginning of each text. Required.
suffixStringDefault: "" (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: