LangReact Project
Project description
🦜️🔗 LangReact
⚡ 用 Planning Agent 来优化的大模型应用 ⚡ ⚡ Build your LLM Application based on planning agent ⚡
🤔 What is LangReact?
LangReact 是一个配置化的 Planning Agent 应用开发工具,通过配置和插件能快速为你的 GPT 应用提供 Planning 能力。
- 配置化: 通过 configure 快速构建你的 Planning Agent,无需对你的 AI 应用代码做任何更改
- 插件化: 通过引入各种各样的工具插件,让你的 AI 应用快速具备使用工具的能力
- 多种 Planning Agent 实现: 通过配置开启多种 Planning 功能:COT、Memory RAG、TOT、Reflection 等
usage
install
pip install langreact
build your application
参考 demo 目录中的 create_a_chatbot.py 创建一个 COT Planning 辅助的聊天机器人
执行这个 demo:
DASHSCOPE_API_KEY=XXXX python3 -m demo.create_a_chatbot
创建和使用一个应用的基本流程:
- 继承 ApplicationPlugin 创建一个自己的 LLM 应用
- 从 demo 中拷贝 default.py 来创建一个新的应用配置文件,例如 demo/qwen_chat_configure.py
- 修改配置中的 MEMORY_INDEX_URI 来引入你的日志 RAG 索引,如果仅仅测试可以执行 demo/simple_milvus_server 中的 start_default_server 方法,创建一个临时的索引
- (可选)根据需要修改配置中的 PROMPT 来定制你自己的 planning agent
- 通过 Flow 创建应用的数据流,赋予你的 LLM 应用 Planning 能力
- 通过 Flow.invoke 来调用你的 LLM 应用
RoadMap
- 提供 LangChain 应用装饰器,方便 LangChain 应用转换
- 提供插件市场,并支持基于插件评分 Reranker
- 提供 AI 数字人应用模版
Contact
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 langreact-0.3.1.tar.gz.
File metadata
- Download URL: langreact-0.3.1.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.5 Darwin/21.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eacf00e22e61f8dfb0a9c95afc32358335ead20f7c0bfec15c5e30ee8215b415
|
|
| MD5 |
d97dfa89298fd2c3bd0b0c309c4a3003
|
|
| BLAKE2b-256 |
590e9e0b873b7880f65a8214cc077991fb8e39f462af079066a8951560d9407d
|
File details
Details for the file langreact-0.3.1-py3-none-any.whl.
File metadata
- Download URL: langreact-0.3.1-py3-none-any.whl
- Upload date:
- Size: 31.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.5 Darwin/21.1.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e4d681cf3bec9ca942074d4ee88eb80e6bc37c8cde697c3ede1f8668e8c142ca
|
|
| MD5 |
9aec1c88b71fc6cf9a839de9331c0e0b
|
|
| BLAKE2b-256 |
157b6cb12fa12df820f6344331518aa8a088cb08074e40adad0fb7efed69c42b
|