MistralAIEmbeddings
This will help you get started with MistralAI embedding models using LangChain. For detailed documentation on MistralAIEmbeddings
features and configuration options, please refer to the API reference.
Overviewโ
Integration detailsโ
Provider | Package |
---|---|
MistralAI | langchain-mistralai |
Setupโ
To access MistralAI embedding models you'll need to create a/an MistralAI account, get an API key, and install the langchain-mistralai
integration package.
Credentialsโ
Head to https://console.mistral.ai/ to sign up to MistralAI and generate an API key. Once you've done this set the MISTRALAI_API_KEY environment variable:
import getpass
import os
if not os.getenv("MISTRALAI_API_KEY"):
os.environ["MISTRALAI_API_KEY"] = getpass.getpass("Enter your MistralAI API key: ")
If you want to get automated tracing of your model calls you can also set your LangSmith API key by uncommenting below:
# os.environ["LANGSMITH_TRACING"] = "true"
# os.environ["LANGSMITH_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")