Skip to main content

OpenAI: Embeddings

Deprecated

This function is deprecated and can no longer be added to new workflows. Existing workflows using it keep running. Use the generic Embeddings function instead.

Generate embeddings for a buffer of claims via OpenAI's embeddings API. Each input claim is vectorized and the response keeps the original identifier and payload, with the produced vector filled in.

For a provider-agnostic embeddings node operating on JSONL files see AI::AIEmbeddings.

Pre-requisite: Install an OpenAI application from Profile > {Organization} > Applications.

Parameters

Applicationrequired
Configured OpenAI application.

Input

JSON Embeddingsrequired

Accepts a JSON payload or a File. Embeddings request like:

Example
{
"embeddings": [
{
"identifier": <String>, # Unique identifier for the claim
"claim": <String>, # Text from which the vector will be generated
"vector": [], # Empty before embeddings
"payload": <Json> # Additional metadata to attach to the claim
}
]
}

Output

JSON Embeddings

Same payload, with each vector field populated:

Example
{
"embeddings": [
{
"identifier": <String>,
"claim": <String>,
"vector": [f32, f32, ...],
"payload": <Json>
}
]
}