chat-ollama icon indicating copy to clipboard operation
chat-ollama copied to clipboard

讨论:获取模型列表接口报错,不知道是不是Node的版本问题

Open yinzhidong opened this issue 11 months ago • 10 comments

image image

{
    "url": "/api/models/",
    "statusCode": 500,
    "statusMessage": "",
    "message": "fetch failed",
    "stack": "<pre><span class=\"stack internal\">at Object.fetch (node:internal/deps/undici/undici:11731:11)</span>\n<span class=\"stack internal\">at process.processTicksAndRejections (node:internal/process/task_queues:95:5)</span></pre>"
}

windows系统,使用的Node版本是:v18.19.1

yinzhidong avatar Mar 12 '24 06:03 yinzhidong

感觉跟 ollama 有关

satrong avatar Mar 12 '24 07:03 satrong

最近有不少用户报了这个问题,还没有深入研究。不过升级node到 v20.5.1 应该能解决这个问题。

sugarforever avatar Mar 12 '24 11:03 sugarforever

最近有不少用户报了这个问题,还没有深入研究。不过升级node到 v20.5.1 应该能解决这个问题。

好的,我明天再试试。

yinzhidong avatar Mar 12 '24 12:03 yinzhidong

使用本地的 ollama 时,Host 设置为 http://localhost:11434 会报这个错,改为 http://127.0.01:11434 就没有问题

sylaryip avatar Mar 14 '24 18:03 sylaryip

使用本地的 ollama 时,Host 设置为 http://localhost:11434 会报这个错,改为 http://127.0.01:11434 就没有问题

你的本地localhost的设置有什么特别吗?

sugarforever avatar Mar 15 '24 01:03 sugarforever

使用本地的 ollama 时,Host 设置为 http://localhost:11434 会报这个错,改为 http://127.0.01:11434 就没有问题

你的本地localhost的设置有什么特别吗?

应该没有,我用别外一台 mbp 使用 localhost 作为 Host 又可以使用。具体情况还要继续排查才知道

sylaryip avatar Mar 15 '24 02:03 sylaryip

使用本地的 ollama 时,Host 设置为 http://localhost:11434 会报这个错,改为 http://127.0.01:11434 就没有问题

你的本地localhost的设置有什么特别吗?

应该没有,我用别外一台 mbp 使用 localhost 作为 Host 又可以使用。具体情况还要继续排查才知道

等你的好消息。

sugarforever avatar Mar 15 '24 17:03 sugarforever

使用本地的 ollama 时,Host 设置为 http://localhost:11434 会报这个错,改为 http://127.0.01:11434 就没有问题

我的win电脑也是通过把localhost域名修改为127.0.0.1后,就解决了报错的问题。回到家里的mac上,使用localhost是完全没有问题的.

yinzhidong avatar Mar 18 '24 07:03 yinzhidong

使用本地的 ollama 时,Host 设置为 http://localhost:11434 会报这个错,改为 http://127.0.01:11434 就没有问题

我的win电脑也是通过把localhost域名修改为127.0.0.1后,就解决了报错的问题。回到家里的mac上,使用localhost是完全没有问题的.

那就是在Ollama Server设置中指向 http://127.0.0.1:11434 就可以在不同平台上正常工作了吧? 代码里已经将默认host指向 http://127.0.0.1:11434 - https://github.com/sugarforever/chat-ollama/blob/main/server/middleware/ollama.ts#L3

这个issue还有什么需要解决的吗?没有的话,我想就可以关闭了 😁

sugarforever avatar Mar 18 '24 17:03 sugarforever

嗯嗯,确实可以关闭了

yinzhidong avatar Mar 25 '24 09:03 yinzhidong