langchain.embeddings.javelin_ai_gateway.JavelinAIGatewayEmbeddings¶
class langchain.embeddings.javelin_ai_gateway.JavelinAIGatewayEmbeddings[source]¶
Bases: Embeddings, BaseModel
Wrapper around embeddings LLMs in the Javelin AI Gateway.
To use, you should have the javelin_sdk python package installed.
For more information, see https://docs.getjavelin.io
Example
from langchain.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: Optional[str] = None¶
The URI for the Javelin AI Gateway API.
param javelin_api_key: Optional[str] = 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.
async aembed_query(text: str) → List[float][source]¶
Asynchronous Embed query text.
classmethod construct(_fields_set: Optional[SetStr] = None, **values: Any) → Model¶
Creates a new model setting __dict__ and __fields_set__ from trusted or pre-validated data.
Default values are respected, but no other validation is performed.
Behaves as if Config.extra = ‘allow’ was set since it adds all passed values