d08200d00e
* Bump Python package versions for 1.12.0 release Bump packages represented in the 1.12.0 changelog, promote Foundry Hosting, Azure Content Understanding, Gemini, Mistral, Monty, and Tools to beta, and apply the requested beta cohort date stamp. Root and core move to 1.12.0, released and RC packages use their selected increments, alpha packages including Hosting MCP use the 260721 stamp, and core floors are raised only for proven consumers. Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf * fix version in readme * Add Responses conversation ID changes to release notes Include the breaking Hosting Responses conversation ID helper changes from #7234 in the Python 1.12.0 changelog. Copilot-Session: 2dd9980a-b869-4c16-8642-75b7a6d6ebdf
1.2 KiB
1.2 KiB
Get Started with Microsoft Agent Framework Mistral AI
Please install this package:
pip install agent-framework-mistral --pre
and see the README for more information.
See the Mistral embedding sample for a runnable example.
Embedding Client
The MistralEmbeddingClient provides embedding generation using Mistral AI models.
Quick Start
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]}...")
Configuration
| 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 |