labring / FastGPT

FastGPT is a knowledge-based platform built on the LLMs, offers a comprehensive suite of out-of-the-box capabilities such as data processing, RAG retrieval, and visual AI workflow orchestration, letting you easily develop and deploy complex question-answering systems without the need for extensive setup or configuration.
https://tryfastgpt.ai
Other
17.51k stars 4.7k forks source link

Connection error #630

Closed zxwmol closed 10 months ago

zxwmol commented 10 months ago

例行检查

你的版本

问题描述 采用fastgpt对接one-api,均采用docker部署,报错:Connection error。 fastgpt完整日志:ERROR] 2023-12-20 08:09:58 sse error: Connection error.: {"stack":"Error: Connection error.\n at tx.makeRequest (/app/projects/app/.next/server/chunks/5092.js:23:79572)\n at process.processTicksAndRejections (node:internal/process/task_queues:95:5)\n at async Object.k [as chatNode] (/app/projects/app/.next/server/chunks/7050.js:90:1025)\n at async M (/app/projects/app/.next/server/chunks/7050.js:90:5284)\n at async Promise.all (index 0)\n at async Promise.all (index 0)\n at async b (/app/projects/app/.next/server/chunks/7050.js:90:6369)\n at async /app/projects/app/.next/server/chunks/1282.js:1:3122"} one-api无报错 复现步骤

预期结果

相关截图 image image image image

c121914yu commented 10 months ago

不能localhost,要用桥接模式。

c121914yu commented 10 months ago

Connection

补补docker网络方式。

YueXingZe commented 9 months ago

您好,请问问题解决了吗

c121914yu commented 9 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Hello, has the problem been solved?

zxwmol commented 9 months ago

已解决,需要使用节点IP,不能用127

c121914yu commented 9 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Solved, node IP needs to be used, 127 cannot be used

xiaoping1993 commented 8 months ago

请问怎么看这个“节点ip”啊,我也遇到这个问题

c121914yu commented 8 months ago

Bot detected the issue body's language is not English, translate it automatically. 👯👭🏻🧑‍🤝‍🧑👫🧑🏿‍🤝‍🧑🏻👩🏾‍🤝‍👨🏿👬🏿


Please tell me how to check this "node IP". I also encountered this problem.

WestCraneLi commented 7 months ago

请求超时大概率是地址没写对,以下是个案例

OPENAI_BASE_URL解决方法

window:ipconfig,查询本机地址 macos:ifconfig | grep "inet " | grep -v 127.0.0.1,查询本机地址

获取到本机地址,如:10.0.1.2

找到你的one-api外露接口,比如ports: 8089:3000,第一个8089就是你外露的,也有可能是3000,毕竟fastgpt和one-api端口一致需要修改一下

那么最终结果就是

OPENAI_BASE_URL=http://10.0.1.2:8089/v1

weifengzyl commented 7 months ago

看这个https://blog.csdn.net/zylwoaini/article/details/136618101