Skip to main content

🔍FreeKnowledge AI

GitHub License PyPI - Format GitHub stars PyPI - License PyPI 书生·铺语大模型

✨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/),
}

Metadata

Release files for FreeKnowledge-AI 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for FreeKnowledge-AI 0.3.1
File Size Uploaded Provenance
freeknowledge_ai-0.3.1.tar.gz 12.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for FreeKnowledge-AI 0.3.1
File Interpreter ABI Platform
FreeKnowledge_AI-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 32.3 kB

Release files / freeknowledge_ai-0.3.1.tar.gz

Download URL freeknowledge_ai-0.3.1.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
1957c79b5f7580903eaa933417dedbf72fad72f84d96c145675866f4d9290863
BLAKE2b-256 checksum
How to use checksums
aad45d8213aadfea1aa4e244d56984f0f2e9e08b35e08c899af3a56137bef802
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.14

Release files / FreeKnowledge_AI-0.3.1-py3-none-any.whl

Download URL FreeKnowledge_AI-0.3.1-py3-none-any.whl
Size 19.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
935b26eab59aa10996c8723b1b0a976a67c7ad838081baf515ee9a091376637f
BLAKE2b-256 checksum
How to use checksums
1a58f6f7515815b7f7a3abc1c5461a667427f8cfb21646aeb13134edd87ccb8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.14

Security for FreeKnowledge-AI 0.3.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page