easy_javadoc icon indicating copy to clipboard operation
easy_javadoc copied to clipboard

feat: 将智谱清颜改为 openai 兼容模式

Open WhiteFeatheredCrow opened this issue 1 year ago • 1 comments

智谱清言 token 过期了,充值后才发现用的是 glm-4,太贵了=。= 复制了下大佬的代码,支持了 openai 兼容的各家 chat 和 ollama 本地模型。

  • 将原来的智谱清言改为 openai兼容
  • 增加自定义内容:model、customUrl
  • ollama 本地模型无需填写 apikey,只需填写 model 和 本地 url

第一次提 pr,见笑了

image image

WhiteFeatheredCrow avatar Jun 17 '24 11:06 WhiteFeatheredCrow

我个人测试ollama 本地模型情况, m1 pro 32G 7B 以下模型(qwen2:1.5b,granite-code:3b ,gemma:2b等)错误率非常高,经常不按提示词给出回答,几乎不可用。 7B 以上模型能按照提示词给出答案,但是我本地速度很慢。建议还是用 deepseek 这种远程模型体验更好。 而且本地模型似乎并不严格按照 openai rest 规范,暂时能用吧

WhiteFeatheredCrow avatar Jun 18 '24 06:06 WhiteFeatheredCrow

@WhiteFeatheredCrow 有不少冲突,辛苦merge一下master~

starcwang avatar Oct 08 '24 09:10 starcwang