Skip to main content

OpenAI: Embeddings

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

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>
}
]
}