| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||
Please install this package:
pip install agent-framework-mistral --preand see the README for more information.
See the Mistral embedding sample for a runnable example.
The MistralEmbeddingClient provides embedding generation using Mistral AI models.
from agent_framework.mistral import MistralEmbeddingClient
# Using environment variables (MISTRAL_API_KEY, MISTRAL_EMBEDDING_MODEL)
client = MistralEmbeddingClient()
# Or passing parameters directly
client = MistralEmbeddingClient(
model="mistral-embed",
api_key="your-api-key",
)
# Generate embeddings
result = await client.get_embeddings(["Hello, world!", "How are you?"])
for embedding in result:
print(f"Dimensions: {embedding.dimensions}")
print(f"Vector: {embedding.vector[:5]}...")| Environment Variable | Description |
|---|---|
| MISTRAL_API_KEY | Your Mistral AI API key |
| MISTRAL_EMBEDDING_MODEL | Embedding model name (e.g., mistral-embed) |
| MISTRAL_SERVER_URL | Optional server URL override |
| Back | FazBrowse Home | New Git URL |