Generates attributes for embedding operations.
Creates OpenTelemetry attributes for embedding-related data including model name and embedding vectors with associated text.
Configuration object for embedding attributes
Optional
Array of embedding objects containing text and vector data
The name of the embedding model used
OpenTelemetry attributes for embedding operations
const attrs = getEmbeddingAttributes({ modelName: "text-embedding-ada-002", embeddings: [ { text: "hello world", vector: [0.1, 0.2, 0.3] }, { text: "goodbye", vector: [0.4, 0.5, 0.6] } ]}); Copy
const attrs = getEmbeddingAttributes({ modelName: "text-embedding-ada-002", embeddings: [ { text: "hello world", vector: [0.1, 0.2, 0.3] }, { text: "goodbye", vector: [0.4, 0.5, 0.6] } ]});
Generates attributes for embedding operations.
Creates OpenTelemetry attributes for embedding-related data including model name and embedding vectors with associated text.