nashsu / FreeAskInternet

FreeAskInternet is a completely free, PRIVATE and LOCALLY running search aggregator & answer generate using MULTI LLMs, without GPU needed. The user can ask a question and the system will make a multi engine search and combine the search result to LLM and generate the answer based on search results. It's all FREE to use.
Apache License 2.0
8.45k stars 879 forks source link

Docker部署成功,但回复一直显示network error该如何解决 #18

Open bosconb opened 5 months ago

bosconb commented 5 months ago

按照docker-compose部署成功,但无论发什么都是network error,后台应该都正常启动了,路由挂美区ip梯子,切换到全局模式也没用。

image image

wolfg1969 commented 5 months ago

首先检查能正常访问 searxng 依赖的 search engine,比如 www.google.com, www.google.com.hk, duckduckgo.com, api.qwant.com, search.brave.com, zh.wikipedia.org, query.wikidata.org 等等,具体可以查看 searxng 容器的日志。 然后确认 compose 文件所在目录下 searxng/settings.yml 中启用了 json 格式输出

formats:
    - html
    - json

如果没有启用 json 格式,backend 容器的日志中可以看到访问 searxng 有 403 错误。

bosconb commented 5 months ago

首先检查能正常访问 searxng 依赖的 search engine,比如 www.google.com, www.google.com.hk, duckduckgo.com, api.qwant.com, search.brave.com, zh.wikipedia.org, query.wikidata.org 等等,具体可以查看 searxng 容器的日志。 然后确认 compose 文件所在目录下 searxng/settings.yml 中启用了 json 格式输出

formats:
    - html
    - json

如果没有启用 json 格式,backend 容器的日志中可以看到访问 searxng 有 403 错误。

谢谢老哥指点,已启用json格式输出,终于有正常反馈,不过只有Reference linking,貌似也有很多朋友有类似的问题

image

wolfg1969 commented 5 months ago

这似乎是访问 chatgpt 的问题

907739769 commented 5 months ago

是因为你没有下载两个配置文件 image

image

wensley commented 5 months ago

刚更新镜像 重新部署了,用的甲骨文美区, { "error": true, "message": "Error in input stream" } { "error": true, "message": "empty response" }

 +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/usr/local/lib/python3.9/site-packages/sse_starlette/sse.py", line 270, in wrap
    |     await func()
    |   File "/usr/local/lib/python3.9/site-packages/sse_starlette/sse.py", line 251, in stream_response
    |     async for data in self.body_iterator:
    |   File "/usr/local/lib/python3.9/site-packages/starlette/concurrency.py", line 65, in iterate_in_threadpool
    |     yield await anyio.to_thread.run_sync(_next, as_iterator)
    |   File "/usr/local/lib/python3.9/site-packages/anyio/to_thread.py", line 56, in run_sync
    |     return await get_async_backend().run_sync_in_worker_thread(
    |   File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
    |     return await future
    |   File "/usr/local/lib/python3.9/site-packages/anyio/_backends/_asyncio.py", line 851, in run
    |     result = context.run(func, *args)
    |   File "/usr/local/lib/python3.9/site-packages/starlette/concurrency.py", line 54, in _next
    |     return next(iterator)
    |   File "/app/server.py", line 152, in predict
    |     for token in free_ask_internet.ask_internet(query=query):
    |   File "/app/free_ask_internet.py", line 219, in ask_internet
    |     content_list = search_web_ref(query,debug=debug)
    |   File "/app/free_ask_internet.py", line 99, in search_web_ref
    |     raise ex
    |   File "/app/free_ask_internet.py", line 39, in search_web_ref
    |     response.raise_for_status()
    |   File "/usr/local/lib/python3.9/site-packages/requests/models.py", line 1021, in raise_for_status
    |     raise HTTPError(http_error_msg, response=self)
    | requests.exceptions.HTTPError: 500 Server Error: Internal Server Error for url: http://searxng:8080/?q=%3Aall+%21general+%E6%88%91%E6%83%B3%E8%AE%A9%E4%BD%A0%E5%81%9A%E4%B8%80%E4%B8%AA%E6%97%85%E6%B8%B8%E6%8C%87%E5%8D%97%E3%80%82%E6%88%91%E4%BC%9A%E6%8A%8A%E6%88%91%E7%9A%84%E4%BD%8D%E7%BD%AE%E5%E3%80%82%E2%80%9D%0A&format=json
    +------------------------------------