Coder Social home page Coder Social logo

nashsu / freeaskinternet Goto Github PK

View Code? Open in Web Editor NEW
8.1K 53.0 870.0 763 KB

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.

License: Apache License 2.0

Dockerfile 1.41% Python 98.59%

freeaskinternet's Introduction

FreeAskInternet

🎉🎉🎉 Yeah we have a logo now! 🎉🎉🎉

lgoo

Running www.perplexity.ai like app complete FREE, LOCAL, PRIVATE and NO GPU NEED on any computer [!IMPORTANT]
If you are unable to use this project normally, it is most likely due to issues with your internet connection or your IP, you need free internet connection to use this project normally. 如果您无法正常使用此项目,很可能是由于您的 IP 存在问题,或者你不能自由访问互联网。

What is FreeAskInternet

FreeAskInternet is a completely free, private and locally running search aggregator & answer generate using LLM, Without GPU needed. The user can ask a question and the system will use searxng to make a multi engine search and combine the search result to the ChatGPT3.5 LLM and generate the answer based on search results. All process running locally and No GPU or OpenAI or Google API keys are needed.

Features

  • 🈚️ Completely FREE (no need for any API keys)
  • 💻 Completely LOCAL (no GPU need, any computer can run )
  • 🔐 Completely PRIVATE (all thing running locally, using custom llm)
  • 👻 Runs WITHOUT LLM Hardware (NO GPU NEED!)
  • 🤩 Using Free ChatGPT3.5 / Qwen / Kimi / ZhipuAI(GLM) API (NO API keys need! Thx OpenAI)
  • 🐵 Custom LLM(ollama,llama.cpp) support, Yes we love ollama!
  • 🚀 Fast and easy to deploy with Docker Compose
  • 🌐 Web and Mobile friendly interface, designed for Web Search enhanced AI Chat, allowing for easy access from any device.

Screenshots

  1. index:

index

  1. Search based AI Chat:

index

  1. Multi LLM models and custom LLM like ollama support:

index

How It Works?

  1. System get user input question in FreeAskInternet UI interface( running locally), and call searxng (running locally) to make search on multi search engine.
  2. crawl search result links content and pass to ChatGPT3.5 / Kimi / Qwen / ZhipuAI / ollama (by using custom llm), ask LLM to answer user question based on this contents as references.
  3. Stream the answer to Chat UI.
  4. We support custom LLM setting, so theoretically infinite llm support.

Status

This project is still in its very early days. Expect some bugs.

Run the latest release

git clone https://github.com/nashsu/FreeAskInternet.git
cd ./FreeAskInternet
docker-compose up -d 

🎉 You should now be able to open the web interface on http://localhost:3000. Nothing else is exposed by default.( For old web interface, accessing http://localhost:3030)

How to get and set Kimi / Qwen / ZhipuAI Token?

How to get Token?

We are using https://github.com/LLM-Red-Team projects to provide those service, you can reference to their readme.

Reference : https://github.com/LLM-Red-Team/kimi-free-api

setting token

How to using custom LLM like ollama? (Yes we love ollama)

  1. start ollama serve
export OLLAMA_HOST=0.0.0.0
ollama serve
  1. set ollama url in setting: You MUST using your computer's ip address, not localhost/127.0.0.1, because in docker you can't access this address. The model name is the model you want to serve by ollama. setting custom llm url

ollama model Reference : https://ollama.com/library

How to update to latest

cd ./FreeAskInternet
git pull
docker compose down
docker compose rm backend
docker compose rm free_ask_internet_ui
docker image rm nashsu/free_ask_internet
docker image rm nashsu/free_ask_internet_ui
docker-compose up -d

Credits

Special thanks to our logo designer

AdlerMurcus

License

Apache-2.0 license

Star History

Star History Chart

freeaskinternet's People

Contributors

nashsu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

freeaskinternet's Issues

cannot start

ERROR: Invalid interpolation format for "searxng" option in service "services": "SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/"
是不是ip除了问题呢

Please make freechatgpt and searxng endpoints configurable

First of all, thanks for sharing this great project, it's pretty cool.

Currently they are hardcoded:

realpath() of /etc/searxng/uwsgi.ini failed: Permission denied [core/utils.c line 3662]

could not start service by docker-compose.

os: debian 4.19.71-arm64-desktop
docker: Docker version 19.03.8, build e781081667
docker-compose: Docker Compose version v2.26.1

Attaching to freeask-backend-1, freeask-chatgpt-next-web-1, freeask-freegpt35-1, freeask-searxng-1
freeask-searxng-1           | SearXNG version 2024.4.8+f1a148f53
freeask-searxng-1           | Use existing /etc/searxng/uwsgi.ini
freeask-searxng-1           | Use existing /etc/searxng/settings.yml
freeask-searxng-1           | Listen on 0.0.0.0:8080
freeask-searxng-1           | realpath() of /etc/searxng/uwsgi.ini failed: Permission denied [core/utils.c line 3662]
freeask-searxng-1 exited with code 1
freeask-freegpt35-1         | 💡 Server is running at http://localhost:3040
freeask-freegpt35-1         | 
freeask-freegpt35-1         | 🔗 Base URL: http://localhost:3040/v1
freeask-freegpt35-1         | 🔗 ChatCompletion Endpoint: http://localhost:3040/v1/chat/completions
freeask-freegpt35-1         | 
freeask-freegpt35-1         | 📝 Original TS Source By: Pawan.Krd
freeask-freegpt35-1         | 📝 Modified Into JavaScript By: Adam
freeask-freegpt35-1         | 

没有内容,只有链接展示

描述

通过README中描述执行 git clone 项目并执行docker 相关命令,本地可以运行,输入问题之后回复中只有链接没有内容

截图

image

typo

typo

should be 'and' here

image

Docker compose提示x509

root@NAS:/volume1/FreeAskInternet/FreeAskInternet# docker-compose up -d
Pulling llm-freegpt35 (missuo/freegpt35:latest)...
latest: Pulling from missuo/freegpt35
4abcf2066143: Pulling fs layer
1c6d0e08288a: Pulling fs layer
25f5c574f7c4: Pulling fs layer
37160e49a8ba: Waiting
c2e473267b16: Waiting
e614815b59fc: Waiting
6a855bb05f29: Waiting
789da063f932: Waiting
ERROR: error pulling image configuration: Get "https://production.cloudflare.docker.com/registry-v2/docker/registry/v2/blobs/sha256/64/6445592ca859a2354f96be72394dc12fb67ef32efe1a45e51c82b6cfc08fe298/data?verify=1712826396-2Jogxv8jt19xk4VYdxnbej9He%2Fk%3D": x509: certificate has expired or is not yet valid: current time 2024-04-11T16:16:36+08:00 is after 2021-09-30T14:01:15Z

在 debian 12 上报错

ERROR: Invalid interpolation format for "searxng" option in service "services": "SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/"

谁知道是怎么回事吗?

只有内容, 没有链接

环境:
win11 docker desktop
使用命令docker-compose up -d直接安装的

使用了本地的chatglm3-6b 的api
没有任何链接:

image

在3000端口也是同样的问题,没有任何回复

image

Transport unknown

{
"code": 0,
"message": "Transport unknown"
}

2024-04-10 09:14:31,843 ERROR:searx.engines.wikidata: Fail to initialize
searxng_1 | Traceback (most recent call last):
searxng_1 | File "/usr/local/searxng/searx/network/init.py", line 95, in request
searxng_1 | return future.result(timeout)
searxng_1 | ^^^^^^^^^^^^^^^^^^^^^^
searxng_1 | File "/usr/lib/python3.11/concurrent/futures/_base.py", line 458, in result
searxng_1 | raise TimeoutError()
searxng_1 | TimeoutError
searxng_1 |
searxng_1 | The above exception was the direct cause of the following exception:
searxng_1 |
searxng_1 | Traceback (most recent call last):
searxng_1 | File "/usr/local/searxng/searx/search/processors/abstract.py", line 73, in initialize
searxng_1 | self.engine.init(get_engine_from_settings(self.engine_name))
searxng_1 | File "/usr/local/searxng/searx/engines/wikidata.py", line 774, in init
searxng_1 | jsonresponse = send_wikidata_query(query)
searxng_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng_1 | File "/usr/local/searxng/searx/engines/wikidata.py", line 161, in send_wikidata_query
searxng_1 | http_response = get(SPARQL_ENDPOINT_URL + '?' + urlencode({'query': query}), headers=get_headers())
searxng_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng_1 | File "/usr/local/searxng/searx/network/init.py", line 164, in get
searxng_1 | return request('get', url, **kwargs)
searxng_1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng_1 | File "/usr/local/searxng/searx/network/init.py", line 97, in request
searxng_1 | raise httpx.TimeoutException('Timeout', request=None) from e
searxng_1 | httpx.TimeoutException: Timeout
searxng_1 | 2024-04-10 09:14:31,884 ERROR:searx.engines.wikidata: Fail to initialize
searxng_1 | Traceback (most recent call last):
searxng_1 | File "/usr/local/searxng/searx/network/init.py", line 95, in request
searxng_1 | return future.result(timeout)
searxng_1 | ^^^^^^^^^^^^^^^^^^^^^^
searxng_1 | File "/usr/lib/python3.11/concurrent/futures/_base.py", line 458, in result
searxng_1 | raise TimeoutError()
searxng_1 | TimeoutError

win11专业版运行docker时出现问题

C:\ai\FreeAskInternet>docker compose up
error during connect: in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect: Get "http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.project%3Dfreeaskinternet%22%3Atrue%7D%7D": open //./pipe/docker_engine: The system cannot find the file specified.

通过代理无法访问

服务器中已经安装梯子 服务器本身可以访问openai 在docker中配置了代理 无法访问
image

Error message

"request returned Internal Server Error for API route and version http://%2F%2F.%2Fpipe%2Fdocker_engine/v1.24/containers/json?all=1&filters=%7B%22label%22%3A%7B%22com.docker.compose.config-hash%22%3Atrue%2C%22com.docker.compose.project%3Dfreeaskinternet%22%3Atrue%7D%7D, check if the server supports the requested API version"

项目运行后请求报错

docker有设置http_proxy, 在searxng容器内请求query.wikidata.org是可以的,但正常运行对话会有如图的报错
大佬,是我的网络问题么?

image

Add support for German Language

If I try to write in languages other than English it either fails to do so or it puts out the answer in Chinese. So please add support for German, thanks <3

问下GPT 是如何查询searxng的返回结果的?

  1. 问下GPT 是如何查询searxng的返回结果的?是用了类似RAG的技术吗? 还是有什么简单的方法?
  2. 还有 searxng查询的结果会缓存吗?

看了下 searxng项目 searxng的搜索网络的结果好像是保存在redis里面

Conflicting Prompts Lead to Chinese-Only Answers

Here is a summary of the issue:
image

In English, explain the rocket equation
Chinese answer supplied

When I looked through the code to see what might cause this, I saw two main portions of the prompt written in Chinese.

If Google translate is correct, the first prompt states:

Unless it's a code, a specific name, or a reference number, the language of the answer should be the same as the question.

I agree with this

The second prompt states:

Responses must be in Chinese Simplified

In the end, the second prompt wins because all responses are in Chinese Simplified. Which, if you want to open up this project to the larger community, keeping the same language as the question should be preferred.

只有链接没内容的看这里,临时解决方案

docker network create my_network
docker run -d  --restart always --network my_network --name aurora -p 8080:8080 ghcr.io/aurora-develop/aurora:latest

docker run -d --name backend --network my_network \
  -p 8000:8000 \
  --restart on-failure \
  docker.io/duriancat/free_ask_internet:1.0

docker run -d --name chatgpt-next-web --network my_network \
  -p 3000:3000 \
  -e OPENAI_API_KEY="FreeAskInternet" \
  -e BASE_URL="http://backend:8000" \
  -e CUSTOM_MODELS="-all,+gpt-3.5-turbo" \
  --restart always \
  yidadaa/chatgpt-next-web

docker run -d --name searxng --network my_network \
  -v $(pwd)/searxng:/etc/searxng:rw \
  -e SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/ \
  --cap-drop ALL \
  --cap-add CHOWN \
  --cap-add SETGID \
  --cap-add SETUID \
  --log-driver json-file \
  --log-opt max-size=1m \
  --log-opt max-file=1 \
  --restart always \
  docker.io/searxng/searxng:latest

换一下就行了FreeGPT3.5,用以上直接跑就 ok
image

ERROR: Invalid interpolation format for "searxng" option in service "services"

docker-compose up -d

error:

ERROR: Invalid interpolation format for "searxng" option in service "services": "SEARXNG_BASE_URL=https://${SEARXNG_HOSTNAME:-localhost}/"

How to fix it? Thanks

My ENV

OS: CentOS7
$ docker --version
Docker version 26.0.0, build 2ae903e
$ docker-compose --version
docker-compose version 1.23.2, build 1110ad01

searxng启动的时候, 总是报告 httpx.TimeoutException: Timeout错误

searxng-1 | Traceback (most recent call last):
searxng-1 | File "/usr/local/searxng/searx/search/processors/abstract.py", line 73, in initialize
searxng-1 | self.engine.init(get_engine_from_settings(self.engine_name))
searxng-1 | File "/usr/local/searxng/searx/engines/wikidata.py", line 774, in init
searxng-1 | jsonresponse = send_wikidata_query(query)
searxng-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng-1 | File "/usr/local/searxng/searx/engines/wikidata.py", line 161, in send_wikidata_query
searxng-1 | http_response = get(SPARQL_ENDPOINT_URL + '?' + urlencode({'query': query}), headers=get_headers())
searxng-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng-1 | File "/usr/local/searxng/searx/network/init.py", line 164, in get
searxng-1 | return request('get', url, **kwargs)
searxng-1 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng-1 | File "/usr/local/searxng/searx/network/init.py", line 97, in request
searxng-1 | raise httpx.TimeoutException('Timeout', request=None) from e
searxng-1 | httpx.TimeoutException: Timeout

总结内容展示不全

目前搜索和总结答案的过程是正确的,但是尝试多次,都出现了总结内容展示不全的问题。答案明显没有显示完整,就停止继续输出内容了。

联网搜索报错

部署方式:render 二进制部署
联网搜索报错:

urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='searxng', port=8080): Max retries exceeded with url: /?q=%3Aall+%21general+%E4%B8%8A%E6%B5%B7%E5%A4%A9%E6%B0%94&format=json (Caused by NameResolutionError("<urllib3.connection.HTTPConnection object at 0x7f0c39c151f0>: Failed to resolve 'searxng' ([Errno -2] Name or service not known)"))

chatgpt搜索结果:
根本原因:Caused by NameResolutionError。错误的根本原因是DNS解析失败——即Python的请求库 urllib3 无法将主机名 searxng 解析为IP地址。错误信息 [Errno -2] Name or service not known 表明无法找到对应的服务或名称

解决:

Please add an additional API interface.

Please add an API interface so that users can utilize this service for internet searches and AI summarization via API calls, and it should be provided as a free service.
Additionally, consider implementing a prefix for specifying the desired model, for example: kimi-sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxx

联网搜索很强大,但是好像似乎失去了连续对话的能力?

不会结合上下文了,看日志是带了上下文的,

INFO:     172.30.0.1:52410 - "POST /v1/chat/completions HTTP/1.1" 200 OK
model='gpt-3.5-turbo' messages=[ChatMessage(role='user', content='舒肤佳香皂为什么内嵌刀片'), ChatMessage(role='assistant', content='舒肤佳香皂内嵌刀片的情况目前尚未得到确切的解释。根据宝洁公司的表态,舒肤佳香皂的生产流程中包括多道严格的工艺和质量检测环节,其中包括过滤和金属探测等步骤,以确保产品质量和安全。据称,在这些生产过程中,刀片不可能出现在舒肤佳香皂的成品中。\n\n然而,消费者在社交媒体上发布的视频显示,确实有刀片嵌入了一块舒肤佳香皂内。尽管宝洁公司对此表示高度重视,并积极与消费者沟通,但尚未给出具体解释或原因。\n\n这种情况可能由多种因素造成,包括生产过程中的异常或疏忽,或者是在产品配送、存储或购买过程中的外部干预。然而,毫无疑问的是,这种情况对消费者造成了严重的安全威胁,需要相关部门进行彻底调查,并采取必要的措施以确保类似事件不再发生。\n\n总的来说,舒肤佳香皂内嵌刀片的确切原因尚未确定,但这一事件凸显了产品质量管理和安全监管方面的重要性,需要相关部门加强监督和管理,以保障消费者的权益和安全。\n\n'), ChatMessage(role='user', content='历史上还有类似的事情吗')] temperature=1.0 top_p=0.7 max_length=None stream=True
INFO:     172.30.0.1:52490 - "POST /v1/chat/completions HTTP/1.1" 200 OK

Snipaste_2024-04-11_08-49-30

优化 执行 google search之前的 分析理解 能力

只有 搜索列表 没有 回答的 问题 我是 通过 退出登录 chat.openai.com 解决的, 似乎openai把 已登录的ip给标记了, 故意不让用 不登录而使用gpt3.5 的功能

觉得FreeAskInternet在执行google搜索之前 理解和分解 问题 还需要优化, 能优化好, 可以直接碾压google了, 完全 可以 搞个 新公司 来 运营 这项目:

Screenshot 2024-04-10 at 16-18-14 NextChat

Screenshot 2024-04-10 at 16-10-48 2024-04-10-161020_1920x1080_scrot png (PNG Image 1920 × 1080 pixels) — Scaled (85%)

不过 跟 https://gaigle.com 的gpt4对比, gpt4回答也有问题:
Screenshot 2024-04-10 at 16-37-00 gAIgle com

Project is Not Completely Local Nor Private

The description claims the following:

  • 💻 Completely LOCAL (no GPU need, any computer can run )
  • 🔐 Completely PRIVATE (all thing runing locally)

Both points are lies. While the search is performed locally, piping all that data into OpenAI's servers is not local nor private in the slightest. It's a cool idea, but at this point this repo doesn't provide anything more than me just using OpenAI's interface directly.

You do not get to claim that everything is local and private when you depend on an external web API. That goes against the whole meaning of those two words.

Set dependent containers Restart-policy =always

When FreeAskInternet is using docker compose up, if the OS is restarted again, these few dependent containers will not auto-start. It's better to set the Restart-policy of the dependent containers to always

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.