livekit-agents-plugin-mistralai
v0.0.2
Published
LiveKit Agents Plugin for MistralAI services - LLM and STT support
Maintainers
Readme
MistralAI Plugin for LiveKit Agents
Support for MistralAI LLM and STT models in LiveKit Agents (Node.js/TypeScript).
See https://docs.livekit.io/agents/integrations/mistral/ for more information.
Installation
npm install livekit-agents-plugin-mistralaiPre-requisites
You'll need an API key from MistralAI. It can be set as an environment variable:
export MISTRAL_API_KEY=your_api_key_hereUsage
LLM (Language Model)
import { LLM } from 'livekit-agents-plugin-mistralai';
import { AgentSession, ChatContext } from '@livekit/agents';
// Create an LLM instance
const llm = new LLM({
model: 'ministral-8b-2410',
apiKey: process.env.MISTRAL_API_KEY, // or set MISTRAL_API_KEY env var
temperature: 0.7,
maxCompletionTokens: 1000,
});
// Use with AgentSession
const session = new AgentSession({
llm: llm,
// ... other options
});STT (Speech-to-Text)
import { STT } from 'livekit-agents-plugin-mistralai';
import { AgentSession } from '@livekit/agents';
// Create an STT instance
const stt = new STT({
model: 'voxtral-mini-latest',
language: 'en',
apiKey: process.env.MISTRAL_API_KEY, // or set MISTRAL_API_KEY env var
});
// Use with AgentSession
const session = new AgentSession({
stt: stt,
// ... other options
});Supported Models
Chat Models (LLM)
mistral-medium-latestmistral-large-latestmistral-medium-2508mistral-large-2411mistral-medium-2505ministral-3b-2410ministral-8b-2410mistral-large-2512ministral-14b-2512ministral-8b-2512ministral-3b-2512mistral-small-2407
STT Models
voxtral-small-2507voxtral-mini-2507voxtral-mini-latestvoxtral-small-latest
