UNPKG

@promptbook/azure-openai

Version:

Promptbook: Run AI apps in plain human language across multiple models and platforms

14 lines (13 loc) 494 B
import type { EmbeddingVector } from '../EmbeddingVector'; /** * Computes the cosine similarity between two embedding vectors * * Note: This is helping function for RAG (retrieval-augmented generation) * * @param embeddingVector1 * @param embeddingVector2 * @returns Cosine similarity between the two vectors * * @public exported from `@promptbook/core` */ export declare function computeCosineSimilarity(embeddingVector1: EmbeddingVector, embeddingVector2: EmbeddingVector): number;