介绍
mistral 模块是 Mistral 平台命令行实现。x-cmd 提供了多个不同平台间多种 AI 大模型的调用能力。无论是本地模型还是 Web 服务上的模型,用户都可以在不同的 AI 大模型间直接无缝切换,并能把之前的聊天记录发送给新的大模块来延续对话。
INFO:
- mistral 私人令牌获取: mistral: console.mistral.ai/api-keys/
- 交互环境中可使用 x mistral --init 进行初始化配置,配置信息将存放于本地保存
- 亦可运行命令 x mistral --cfg apikey=[apikey] 添加私人令牌
首次用户
-
在终端运行
eval "$(curl https://get.x-cmd.com)"即可完成 x 命令安装, 详情参考 x-cmd 官网 -
x-cmd 提供 mod 教程,其中包含了 mistral 模块常用功能的 demo 示例,可以帮你快速上手 mistral 模块。
-
使用案例:
# 把文件内容翻译为中文
@mistral --file ./abstract.cn.md --file ./content.cn.md Translate to chinese
# 把文件内容翻译为中文
x mistral chat request --file ./abstract.cn.md --file ./content.cn.md Translate to chinese
# 列出所有模型
x mistral model ls
子命令
| 名称 | 描述 |
|---|---|
| x mistral init | 使用交互模式初始化配置 |
| x mistral --cur | 当前会话默认值管理 |
| x mistral --cfg | 配置管理,可管理 apikey、请求默认代理等配置 |
| x mistral chat | 与 mistral 对话 |
| x mistral model | 模型查看与管理 |
TIP:
在交互式终端中(如 zsh, bash ...),可以使用
Tab获取补全信息运行
x mistral --help可以获取命令的更多信息