JavelinAIGatewayEmbeddings#

class langchain_community.embeddings.javelin_ai_gateway.JavelinAIGatewayEmbeddings[source]#

Bases: Embeddings, BaseModel

Javelin AI Gateway embeddings.

To use, you should have the javelin_sdk python package installed. For more information, see https://docs.getjavelin.io

Example

from langchain_community.embeddings import JavelinAIGatewayEmbeddings

embeddings = JavelinAIGatewayEmbeddings(
    gateway_uri="<javelin-ai-gateway-uri>",
    route="<your-javelin-gateway-embeddings-route>"
)
param client: Any = None#

javelin client.

param gateway_uri: str | None = None#

The URI for the Javelin AI Gateway API.

param javelin_api_key: str | None = None#

The API key for the Javelin AI Gateway API.

param route: str [Required]#

The route to use for the Javelin AI Gateway API.

async aembed_documents(texts: List[str]) List[List[float]][source]#

Asynchronous Embed search docs.

Parameters:

texts (List[str]) – List of text to embed.

Returns:

List of embeddings.

Return type:

List[List[float]]

async aembed_query(text: str) List[float][source]#

Asynchronous Embed query text.

Parameters:

text (str) – Text to embed.

Returns:

Embedding.

Return type:

List[float]

embed_documents(texts: List[str]) List[List[float]][source]#

Embed search docs.

Parameters:

texts (List[str]) – List of text to embed.

Returns:

List of embeddings.

Return type:

List[List[float]]

embed_query(text: str) List[float][source]#

Embed query text.

Parameters:

text (str) – Text to embed.

Returns:

Embedding.

Return type:

List[float]

Examples using JavelinAIGatewayEmbeddings