| 配置项 | 推荐填写内容 | 注意事项 |
|---|---|---|
| API Key | sk-xxxxxxxxxxxxxxxx | 请直接填写纯文本密钥,不要带 Bearer 前缀。 |
| Base URL | https://platform.shuyanai.com | 不包含 /v1。 |
| 模型名称 | 填写 数眼智能 实际支持的模型名 | 必须填写你账号有权限调用且平台真实存在的模型。 |
grok --help。如果能正常输出使用指南,说明安装成功,可以进行下一步配置。--base-url 结尾请勿携带 /v1。-p 3001:指定运行端口(避开默认的 3000 端口)。-k:你的 API Key。(只需输入一次,后续启动可省略此参数)。--base-url:填写 数眼智能 接口根地址(推荐 https://platform.shuyanai.com )。notepad $PROFILEfunction grok-short {
grok -p 3001 --base-url "https://platform.shuyanai.com" --reasoning-model "你的模型名" --completion-model "你的模型名"
}
Set-Alias grok grok-short$content = @'
function grok-short {
# 使用 grok.cmd 避免死循环,使用 -p 3001 避免端口冲突
grok.cmd -p 3001 --base-url "https://platform.shuyanai.com" --reasoning-model "deepseek-v3.2-exp" --completion-model "deepseek-v3.2-exp"
}
# 使用 -Force 强制覆盖,不再需要繁琐的 if 判断
Set-Alias grok grok-short -Force
'@
Set-Content -Path $PROFILE -Value $content
. $PROFILEmodel ""可以换成控制台支持的海量模型。--base-url。请确保网址末尾没有 /v1。https://platform.shuyanai.com
/v1https://platform.shuyanai.com
-p 3001 改为 -p 3002 或其他任意四位数端口。