An Agent for obtaining external knowledge for free.
Project description
🔍FreeKnowledge AI
✨An agent that provides free and flexible access to external knowledge!!
1. 📖Introduction
Currently, there are only a few interfaces such as DuckDuckGO that can be used to obtain external knowledge for free. These interfaces are difficult to obtain complete external knowledge and are very cumbersome and cannot obtain external knowledge related to the original problem. Most of the interfaces with better effects are relatively expensive, such as Bocha, Google and other APIs. Therefore, we open-source a free and flexible external knowledge interface - FreeKnowledge AI 。
2. 😀Simple & Free
- You only need to download the knowledge_AI dependency to use it, which is very convenient!!
pip install FreeKnowledge-AI==0.2.0
- A simple example of acquiring external knowledge: Before using it, we recommend that you read the Flexible section to better understand the flexibility of FreeKnowledge AI .
from FreeKnowledge_AI import knowledge_center
# 1.Initialize the knowledge agent
center = knowledge_center.Center()
question = "2024年上海工程技术大学研究生复试分数线"
flag = False # Flag indicates whether a large model is needed, and the output content will be more beautiful and standard.
mode = "BAIDU" # Currently only supports "BAIDU" and "DUCKDUCKGO"。
# 2.Respond to external knowledge
results = center.get_response(question, flag, mode)
print(results)
- Log of External knowledge obtained from the website:
- Console Output:
3. ⚡Flexible
We allow passing in a variety of parameters to better control the output, including:
question: Question entered by the user (Required)。flag: Whether to use a large model to extract the core content of crawled external knowledge (Default True)。mode: "BAIDU", "DUCKDUCKGO" (Default "DUCKDUCKGO"),or "URL_SPECIFIC"。You need to use VPN when using "DUCKDUCKGO", but not "BAIDU". We recommend using "DUCKDUCKGO" because the crawled results are more accurate, but Baidu's response speed will be faster.
specific_url:This specifies the exact URL(s) to crawl directly. Example: "https://docs.python.org/3/tutorial/model: You can choose the large model you want to use (Default "internlm/internlm2_5-7b-chat").base_url: The base_url of the model (Default "https://api.siliconflow.cn/v1/chat/completions").key: Pass in your own key。max_web_results: Get the amount of crawled external knowledge (Default 5)。
Report errors:
When you fail to obtain website content, don't worry, just wait a little longer, because some websites require verification. Another solution is to increase the number of retries and thread sleep time.
4. 📋Complete Example
from FreeKnowledge_AI import knowledge_center
center = knowledge_center.Center()
question = "2025年EMNLP会议的主题是什么?"
flag = True
mode = "DUCKDUCKGO"
results = center.get_response(question, flag, mode, model="internlm/internlm2_5-7b-chat",
base_url="https://api.siliconflow.cn/v1/chat/completions", key = "xxx", max_web_results = 2)
print(results)
5. 👇Citation
If you think this project is useful to you, please click star and cite this project。
@misc{Wu2024FreeKnowledge_AI,
title={FreeKnowledge_AI: An agent that provides free and flexible access to external knowledge,
author={Yuhang Wu and Henghua Zhang and Wenzheng Wang},
year={2025},
url=[{<url id="cuqmhcd43355nsg2o9dg" type="url" status="parsed" title="GitHub -VovyH/FreeKnowledge_AI" wc="6723">https://github.com/VovyH/FreeKnowledge_AI</url>}](https://github.com/VovyH/FreeKnowledge_AI/),
}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file freeknowledge_ai-0.3.1.tar.gz.
File metadata
- Download URL: freeknowledge_ai-0.3.1.tar.gz
- Upload date:
- Size: 12.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1957c79b5f7580903eaa933417dedbf72fad72f84d96c145675866f4d9290863
|
|
| MD5 |
87cb3be171c795220b691813a5f32f33
|
|
| BLAKE2b-256 |
aad45d8213aadfea1aa4e244d56984f0f2e9e08b35e08c899af3a56137bef802
|
File details
Details for the file FreeKnowledge_AI-0.3.1-py3-none-any.whl.
File metadata
- Download URL: FreeKnowledge_AI-0.3.1-py3-none-any.whl
- Upload date:
- Size: 19.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
935b26eab59aa10996c8723b1b0a976a67c7ad838081baf515ee9a091376637f
|
|
| MD5 |
3f82170d4944dc591023564a4107377b
|
|
| BLAKE2b-256 |
1a58f6f7515815b7f7a3abc1c5461a667427f8cfb21646aeb13134edd87ccb8d
|