@archastro/sdk
    Preparing search index...

    Class EmbeddingResource

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Compare the embedding similarity of two texts Embeds both texts in one synchronous request using the platform's default embedding model, then returns their cosine similarity. The score uses the same 1 - cosine_distance convention as context retrieval. A score near 1.0 indicates similar vector direction; lower scores indicate less similar text. This endpoint is intended for authenticated users interactively exploring how the platform's retrieval similarity behaves.

      Parameters

      • input: { text_a: string; text_b: string }

        Request body.

        • text_a: string

          First text to embed and compare.

        • text_b: string

          Second text to embed and compare.

      Returns Promise<{ model: string; similarity_score: number }>

      Successful response