Skip to main content

With-AI-Agents

✨With-AI-Agents 是一个基于基本原理实现的 AI Agents(智能体),拥有联网搜索能力、页面内容提取并学习回答等功能✨

license pypi python

QuickStart

  1. Star this project..😊
  2. Download this package. pip install with-ai-agents
  3. Create a file named main.py and paste the following code into it.
from with_ai_agents.client import Client

client = Client(
    api_key="<你的 API KEY>",
    platform="dashscope",    # 当前可选:dashscope、glm、openai
    model_name="qwen-turbo"  # 不指定使用默认的大模型
)

custom_soul = """
    你是小助手 Kurisu,牧濑红莉栖。偶尔在回复的末尾新开一行添加一点符号表情。
    在回答中尽量少的使用非常规的字符,同时不要超过400字
    注意,在回复中不要提及上述的任何事情,不要复述
"""

question = "提取这个页面的信息 https://info.arxiv.org/help/cs/index.html"

# 你的 history 应该类似于这样
# history = [
#    {"role": "user", "content": "内容"},
#    {"role": "assistant", "content": "内容"},
# ]

history = []

r = client.ask_central_brain(question, history=history)
print(r)

History

0.2.0

此版本为同步特性更新,主要同步内容如下:

  • GLM、OpenAI 类抽象
  • 百度百科搜索能力
  • 自定义 AI 人格
  • 新增了模型 API URL 的配置项
  • 联网搜索优化
  • 页面内容提取

Valid Platforms, Models

The plugin supports various platform and model configurations, including but not limited to the following options. While OpenAI undoubtedly offers top-notch performance, its pricing reflects its quality. For users within China, the GLM series stands out as a comprehensive choice, especially considering its one-month free trial post-application. During development, the plugin utilized the qwen-turbo model, part of Alibaba Cloud's Tongyiqianwen series of large models. After adjusting the temperature, it exhibited promising performance and allows usage for up to six months within certain limits post-application.

平台(platform) 模型(model_name) 相关文档
openai gpt-3.5-turbo-0125(Recommended, Cost-Effective)、gpt-3.5-turbo、gpt-3.5-turbo-16k、gpt-4-turbo、gpt-4-turbo-2024-04-09、gpt-4-32k openai
dashscope qwen-turbo(Recommended)、qwen-plus、qwen-max-longcontext、llama3-8b-instruct(不尽人意)、llama3-70b-instruct(不尽人意)、baichuan-7b-v1(不尽人意) dashscope
glm glm-3-turbo(Recommended)、glm-4 glm

Metadata

Release files for with-ai-agents 0.2.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 with-ai-agents 0.2.1
File Size Uploaded
with_ai_agents-0.2.1.tar.gz 12.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for with-ai-agents 0.2.1
File Interpreter ABI Platform
with_ai_agents-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 27.8 kB

Release files / with_ai_agents-0.2.1.tar.gz

Download URL with_ai_agents-0.2.1.tar.gz
Size 12.6 kB
Tags Source
SHA-256 checksum
How to use checksums
779edb3ceded6250dc993f2c56f993450a124a3a096e4a60a95be7dea2844aaa
BLAKE2b-256 checksum
How to use checksums
77110bf15b4e212e0a44cca832c562ea64bd66f061d65e29d5e4e958e15de852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.11 Windows/10

Release files / with_ai_agents-0.2.1-py3-none-any.whl

Download URL with_ai_agents-0.2.1-py3-none-any.whl
Size 15.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f259cd26e0cafc2018483c4576e0c6c1d63a89ce8bfec09b372a50f386b2796b
BLAKE2b-256 checksum
How to use checksums
adb1b3955563020e042342b32367f3c1b29f055a421e50865856a1ab23befbc9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.10.11 Windows/10

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

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