AimlapiEmbeddings features and configuration options, please refer to the API reference.
Overview
Integration details
| Class | Package | Local | JS support | Downloads | Version |
|---|---|---|---|---|---|
| AimlapiEmbeddings | langchain-aimlapi | ❌ | ❌ |
Setup
To access AI/ML API embedding models you’ll need to create an account, get an API key, and install thelangchain-aimlapi integration package.
Credentials
Head to aimlapi.com to sign up and generate an API key. Once you’ve done this set theAIMLAPI_API_KEY environment variable:
Installation
The LangChain AI/ML API integration lives in thelangchain-aimlapi package:
Instantiation
Now we can instantiate our embeddings model and perform embedding operations:Indexing and Retrieval
Embedding models are often used in retrieval-augmented generation (RAG) flows. Below is how to index and retrieve data using theembeddings object we initialized above with InMemoryVectorStore.
Direct usage
You can directly callembed_query and embed_documents for custom embedding scenarios.
Embed single text
Embed multiple texts
API reference
For detailed documentation onAimlapiEmbeddings features and configuration options, please refer to the API reference.