OpenAIEmbedder
OpenAIEmbedder
The OpenAIEmbedder
step is used to embed your text chunks into a vector space with the OpenAI api.
You must register your OpenAI api key with OneContext to use this step.
Step Args
Key | Value Type | Value Description |
---|---|---|
model |
literal |
An OpenAI embedding model: "text-embedding-ada-002", "text-embedding-3-small" or "text-embedding-3-large" |
include_metadata |
array |
Metadata fields to include on the embedding. For example, if you want to include the model and file_name metadata fields, you would set this to [ model, file_name ] .1 |
query |
str or None |
the query to embed. This argument is only required when the step is at the root of the pipeline like in a query pipelines preceding the Retriever |
Note if the input chunks are longer than the max tokens of the selected model the chunks will be truncated to fit the required length.
Valid input steps: Preprocessor
, Chunker