跳过主要内容
Cline 支持通过 Mistral AI API 访问模型,包括标准的 Mistral 模型和专用于代码的 Codestral 模型。 网站: https://mistral.ai/

获取 API 密钥

  1. 注册/登录: 访问 Mistral 平台。创建账户或登录。您可能需要完成验证过程。
  2. 创建 API 密钥

支持的模型

Cline 支持以下 Mistral 模型
  • pixtral-large-2411
  • ministral-3b-2410
  • ministral-8b-2410
  • mistral-small-latest
  • mistral-medium-latest
  • mistral-small-2501
  • pixtral-12b-2409
  • open-mistral-nemo-2407
  • open-codestral-mamba
  • codestral-2501
  • devstral-small-2505
注意: 模型的可用性和规格可能会发生变化。请参考 Mistral AI 文档Mistral 模型概述 以获取最新信息。

在 Cline 中配置

  1. 打开 Cline 设置: 单击 Cline 面板中的设置图标 (⚙️)。
  2. 选择提供商: 从“API 提供商”下拉列表中选择“Mistral”。
  3. 输入 API 密钥: 如果您使用的是标准 mistral 模型,请将您的 Mistral API 密钥粘贴到“Mistral API 密钥”字段中。如果您打算使用 codestral-latest,请参阅下面的“使用 Codestral”部分。
  4. 选择模型: 从“模型”下拉列表中选择您想要的模型。

使用 Codestral

Codestral 是一个专门为代码生成和交互设计的模型。对于 Codestral,您可以使用不同的端点(默认:codestral.mistral.ai)。如果使用 La Plateforme API 密钥进行 Codestral,请将 Codestral Base Url 更改为:https://api.mistral.ai 要在 Cline 中使用 Codestral:
  1. 在 Cline 设置中选择“Mistral”作为 API 提供商。
  2. 从“模型”下拉列表中选择一个 Codestral 模型(例如,codestral-latest)。
  3. 将您的 Codestral API 密钥(来自 codestral.mistral.ai)或您的 La Plateforme API 密钥(来自 api.mistral.ai)输入到 Cline 中相应的 API 密钥字段中。