one-api ollama(llama2模型)渠道测试请求一直返回404(gpt-3.5-turbo)

eimct9ow  于 2个月前  发布在  其他
关注(0)|答案(7)|浏览(28)

例行检查

  • 我已确认目前没有类似 issue
  • 我已确认我已升级到最新版本
  • 我已完整查看过项目 README,尤其是常见问题部分
  • 我理解并愿意跟进此 issue,协助测试和提供反馈
  • 我理解并认可上述内容,并理解项目维护者精力有限,不遵循规则的 issue 可能会被无视或直接关闭

问题描述
渠道配置的llama2模型,但是测试请求一直请求gpt-3.5-turbo报404

复现步骤
预期结果
相关截图
如果没有的话,请删除此节。

tmb3ates

tmb3ates1#

本地请求是正常的

curl [http://localhost:11434/v1/chat/completions](http://localhost:11434/v1/chat/completions) -H "Content-Type: application/json" -d '{
 "model": "llama2",
 "messages": [
 {
 "role": "system",
 "content": "You are a helpful assistant."
 },
 {
 "role": "user",
 "content": "Hello!"
 }
 ]
}'
0tdrvxhp

0tdrvxhp2#

本地请求是正常的,使用curl命令发送请求:

curl [http://localhost:11434/v1/chat/completions](http://localhost:11434/v1/chat/completions) -H "Content-Type: application/json" -d '{ "model": "llama2", "messages": [ { "role": "system", "content": "You are a helpful assistant." }, { "role": "user", "content": "Hello!" } ] }'
tzcvj98z

tzcvj98z4#

我这边只有在点击页面“测试”时,才会报告"status code 404: model 'gpt-3.5-turbo' not found, try pulling it first",但在NextChat中可以正常使用。

另外请教一下,Base URL我只配成http://host.docker.internal:11434才可以,docker怎么设置才能配成http://localhost:11434呢?不调整ollama可以吗?以下是我的docker命令:

docker run --name one-api-mysql -d --restart always -p 3000:3000 --add-host="host.docker.internal:host-gateway" -e SQL_DSN="root:123456@tcp(host.docker.internal:3306)/oneapi" -e TZ=Asia/Shanghai -v /Users/user/data/one-api-mysql:/data justsong/one-api
rm5edbpk

rm5edbpk5#

我这边只有在点击页面“测试”时,才会报告"status code 404: model 'gpt-3.5-turbo' not found, try pulling it first",但在NextChat中可以正常使用。

另外请教一下,Base URL我只有配置成http://host.docker.internal:11434才能正常工作,docker怎么设置才能配置成http://localhost:11434呢?不调整ollama可以吗?以下是我的docker命令:
大佬,我没有ollama的密钥。这个密钥应该怎么填写?

qv7cva1a

qv7cva1a6#

我这边只有在点击页面“测试”时,才会报告"status code 404: model 'gpt-3.5-turbo' not found, try pulling it first",但在NextChat中可以正常使用。

另外请教一下,Base URL我只有配成http://host.docker.internal:11434才可以,docker怎么设置才能配成http://localhost:11434呢?不调整ollama可以吗?以下是我的docker命令:

大佬,我没有ollama的密钥。这个密钥应该怎么填写?

不是大佬,随便填个空格或者"ollama"都可以的。

chy5wohz

chy5wohz7#

好的,非常感谢。我也遇到了同样的问题,curl可以正常使用,但是oneapi无法配置。我昨晚更新了最新版的oneapi,今天尝试重新配置一下。

发件人:***@***.***>; 发送时间:2024年3月16日(星期六)上午8:29
收件人:***@***.***>; 抄送:***@***.***>; ***@***.***>; 主题:Re: [songquanpeng/one-api] ollama(llama2模型)渠道测试请求一直返回404(gpt-3.5-turbo) (Issue #1076) 我这边只有点页面“测试”的时候报"status code 404: model 'gpt-3.5-turbo' not found, try pulling it first",但在NextChat中可以正常使用 另外请教下,Base URL我只有配成 http://host.docker.internal:11434 才可以,docker怎么设置才能配成 http://localhost:11434 呢?不调整ollama可以吗?以下是我的docker命令: docker run --name one-api-mysql -d --restart always -p 3000:3000 --add-host="host.docker.internal:host-gateway" -e ***@***.***(host.docker.internal:3306)/oneapi" -e TZ=Asia/Shanghai -v /Users/user/data/one-api-mysql:/data justsong/one-api 大佬,ollama没有密钥。这个密钥怎么填写? 不是大佬,随便填个空格或者"ollama"都可以的 — 回复此邮件,查看GitHub上的直接回复,或取消订阅。您收到此邮件是因为您评论了。消息ID:***@***.***>

相关问题