测试弹窗

部署LM Studio可以查看这篇文章,这里讲部署后如何对接第三方AI客户端,以 Cherry Studio 为例。
安装 Cherry Studio。
Github:https://github.com/CherryHQ/cherry-studio
在设置中添加模型服务,名称随意。
在 LM Studio 中开启api接口,并复制本地连接地址
输入 LM Studio 的api接口
此时会显示 LM Studio 存在的模型,添加上去。
然后就可以愉快聊天了
以 沉浸式翻译 为例
官网:https://immersivetranslate.com/
安装扩展后进入设置界面,选择翻译服务
extension://bpoadfkcbjbfhfodiogcnhhhpibjhbnh/options.html#services
添加 OpenAI 兼容服务
名称随意,api接口为上面 LM Studio 暴露的端口地址,模型可以手动填写
最后右上角验证
返回上一个界面启用,并设置默认
就可以愉快玩耍了
看看8B出来的翻译效果
速度很慢,看起来也不是很聪明,还是不建议使用了。
以VS Code插件 Roo Code (prev. Roo Cline) 为例
市场:https://marketplace.visualstudio.com/items?itemName=RooVeterinaryInc.roo-cline
安装完成后,点开左侧栏的小火箭图标,
API Provider 选择 LM Studio,选择自己的模型
然后就可以对话写代码了。
此时可能会遇到报错
Please check the LM Studio developer logs to debug what went wrong. You may need to load the model with a larger context length to work with Roo Code's prompts.
这是因为下文长度不够,在LM Studio里重新调整上下文长度即可
这里上下文长度设置成 15000,就可以正常执行了。
文章不错?点个赞呗
0
为什么我用cherry studio调用lm studio的api时,问我要api key?
lm studio没有api key,cherry studio的api密钥留空就行,检查一下api地址是否正确
感谢回复
我把lm studio生成的api地址填进cherry studio(和你的一样),使用的时候提示我需要api key
用浏览器访问服务器地址,提示 {"error":"Unexpected endpoint or method. (GET /)"}
http://127.0.0.1:1234/v1/models 能正常返回说明api地址没问题,可以自行检查一下lm studio底部的log日志,或者手动post http://127.0.0.1:1234/v1/chat/completions 进行排查
谢谢,可以了