OpenAIDocumentEmbedder Parameters

Check the parameters you can configure for Shaper in pipeline YAML.

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. Required.
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. See OpenAI's production best practices for more information.
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.
batch_sizeIntegerDefault: 32Number of Documents to encode at once.
Required.
progress_barBooleanTrue, False
Default: True
If True, shows a progress bar when running.
Required.
meta_fields_to_embedListDefault: NoneList of meta fields that will be embedded along with the document text.
Optional.
embedding_separatorStringDefault: "\n"Separator used to concatenate the meta fields to the document text.
Required.
timeoutFloatDefault: NoneTimeout for OpenAI client calls. If not set, it is inferred from the OPENAI_TIMEOUT environment variable or set to 30.
Optional.
max_retriesIntegerDefault: NoneMaximum retries to establish contact with OpenAI if it returns an internal error. If not set, it is inferred from the OPENAI_MAX_RETRIES environment variable or set to 5.
Optional.

REST API Runtime Parameters

There are no runtime parameters you can pass to this component when making a request to the Search REST API endpoint.