翻篇收录说明
翻篇网页快照

Mistral AI LLM plugin guide | LiveKit Documentation

https://docs.livekit.io/agents/models/llm/mistralai/

最近抓取:2026-12-05 02:13:23(北京时间)

最近内容变化:2026-12-02 13:42:03(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

How to integrate Mistral AI's La Plateforme inference service with LiveKit Agents.

正文摘录

Available inPython|Node.jsOverviewThis plugin allows you to use Mistral AI as an LLM provider for your voice agents. The plugin uses the Mistral Conversations API, which supports both function tools and provider tools.InstallationInstall the LiveKit Mistral AI plugin from PyPI or npm:PythonNode.jsuv add "livekit-agents[mistralai]~=1.8"pnpm add @livekit/agents-plugin-mistralaiAuthenticationThe Mistral AI integration requires a Mistral AI API key .Set the MISTRAL_API_KEY in your .env file.UsageUse Mistral AI within an AgentSession or as a standalone LLM service. For example, you can use this LLM in the Voice AI quickstart.PythonNode.jsfrom livekit.plugins import mistralai session = AgentSession( llm=mistralai.LLM( model="mistral-medium-latest" ), # ... tts, stt, vad, turn_handling, etc.)import * as mistralai from '@livekit/agents-plugin-mistralai'; const session = new voice.AgentSession({ llm: new mistralai.LLM({ model: "mistral-medium-latest", }), // ... tts, stt, vad, turnHandling, etc.});ParametersThis section describes some of the available parameters. See the plugin reference for a complete list of all available parameters.modelstring | ChatModelsDefault: mistral-small-latestWhich Mistral AI model to use. You can pass a string or a typed enum from ChatModels.temperaturefloatSampling temperature that controls the randomness of the model's output. Higher values make the output more random, while lower values make it more focused and deterministic. Range of valid values can vary by model.top_pfloatNucleus sampling parameter.presence_penaltyfloatPenalize new tokens based on their presence in the text so far.frequency_penaltyfloatPenalize new tokens based on their frequency in the text so far.random_seedintRandom seed for reproducibility.tool_choiceToolChoice | Literal['auto', 'required', 'none']Controls how the model uses tools. String options are as follows:'auto': Let the model decide.'required': Force tool usage.'none': Disable tool usage.max_completion_tokensintThe maximum number of tokens the LLM can output.storeboolOnly Available inPythonControls whether Mistral stores each conversation on its servers. The Conversations API stores conversations by default. Set to False to opt out. The plugin sends the full chat context with every request and never relies on a stored conversation.Behavior change: Conversations API onlyThe plugin always uses the Conversations API. The api_mode parameter is deprecated and has no effect, including when set to "chat_completions".Provider tools ONLY Available inPythonThe Mistral Conversations API supports the following provider tools that enable the model to use built-in capabilities executed on the model server. These tools can be used alongside function tools defined in your agent's codebase.ToolDescriptionParametersWebSearchSearch the internet for up-to-date information.NoneDocumentLibrarySearch uploaded document collections via Libraries .library_ids (required)CodeInterpreterWrite and execute Python code in a sandboxed environment.NoneConnectorAccess external services like Google Calendar or Notion using Mistral Connectors .connector_id (required)from livekit.plugins import mistralai agent = MyAgent( llm=mistralai.LLM(model="mistral-medium-latest"), tools=[ mistralai.tools.WebSearch(), # replace with any supported provider tool ],)Additional resourcesThe following resources provide more information about using Mistral AI with LiveKit Agents.Python packageReferenceGitHubPyPINode.js pluginReferenceGitHubNPMMistral AI STT docsMistral AI STT documentation.Mistral AI docsMistral AI platform documentation.Voice AI quickstartGet started with LiveKit Agents and Mistral AI.On this pageOverviewInstallationAuthenticationUsageParametersProvider tools Additional resources