✨新特性
1. DB-GPT 支持 RAG AWEL SDK:
- **Assembler 知识构建**
- **Retriever 知识检索**
示例:https://docs.dbgpt.site/docs/latest/awel/cookbook/first_rag_with_awel
并新增两个 dbgpts:rag-save-url-to-vstore 和 rag-url-knowledge-example
使用 dbgpt app install rag-save-url-to-vstore``dbgpt app install rag-url-knowledge-example
即可安装体验。
具体使用说明见:
https://github.com/eosphoros-ai/dbgpts/blob/main/workflow/rag-save-url-to-vstore/README.md
https://github.com/eosphoros-ai/dbgpts/blob/main/workflow/rag-url-knowledge-example/README.md
- DB-GPT 发布 v2 版本 RESTful API 和 Python Client SDK
API文档:https://docs.dbgpt.site/docs/latest/api/introduction
注意:所有的 API key 需要包含在HTTP header里
curl "http://localhost:5000/api/v2/chat/completions" \
-H "Authorization: Bearer $DBGPT_API_KEY" \
安装Client Python SDK
pip install "dbgpt[client]>=0.5.2"
2.1 Chat
发布新版/chat/completions
接口,并兼容OpenAI报文格式。
- Curl
POST /api/v2/chat/completions
- Python
from dbgpt.client import Client
DBGPT_API_KEY = "dbgpt"
client = Client(api_key=DBGPT_API_KEY)
async for data in client.chat_stream(
model="chatgpt_proxyllm",
messages="hello",
):
print(data)
2.2 App
使用RESTful API对App, Flow, Knowledge, Datasource进行管理
POST /api/v2/serve/apps
PUT /api/v2/serve/apps
DELETE /api/v2/serve/apps
GET /api/v2/serve/apps
GET /api/v2/serve/apps/{app_id}
使用Client Python API 对App, Flow, Knowledge, Datasource进行管理
await create_app(client=client, app_model=app_model)
await update_app(client=client, app_model=app_model)
await delete_app(client=client, app_id=app_id)
await get_app(client=client, app_id=app_id)
await list_app(client=client)
3.新增 RAG 检索评估模块
dataset = [
{
"query": "what is awel talk about",
"contexts": [
"Through the AWEL API, you can focus on the development"
" of business logic for LLMs applications without paying "
"attention to cumbersome model and environment details."
],
},
]
evaluator = RetrieverEvaluator(
operator_cls=EmbeddingRetrieverOperator,
embeddings=embeddings,
operator_kwargs={
"top_k": 5,
"vector_store_connector": vector_connector,
},
)
results = await evaluator.evaluate(dataset)
4.支持接入 Yi API 代理大模型
5.Datasource 模块重构
6.多模型管理模型同一个模型服务支持多个版本
7.国际化(i18n)支持与自动多语言翻译
DB-GPT 服务端支持 i18n,并通过大模型进行将原文翻译到多语言,目前支持: en(英语)、zh_CN (简体中文)、ja (日语)、 ko (韩语)、fr (法语) 和 ru (俄语)。
自动翻译代码见:https://github.com/eosphoros-ai/DB-GPT/blob/main/i18n/translate_util.py
8.命令行执行 AWEL Flow 程序
通过dbgpt run flow
命令在命令行直接触发运行 AWEL flow,目前支持流式、非流式和多轮交互对话。
9.新增 AWEL 实现 “Chat Data” 功能的 Cookbook
通过 AWEL 的 API,结合数据源、向量化数据和大模型实现一个类似 DB-GPT 自带的“Chat Data”功能,并通过自定义算子实现更复杂的数据处理。
详情见:
https://docs.dbgpt.site/docs/latest/awel/cookbook/write_your_chat_database
🐞 Bug 修复
- 修复 Dashboard 显示图表问题 (#1319)
- 修复 AWEL 检查空数据问题
- 修复 Doris 数据源缺失 comment 问题
- 修复 ClickHouse 默认登录问题
- 修复 agent 丢失消息问题
- 修复加载多个 plugin 问题
- 修复默认安装 psycopg2 和 mysqlclient 失败的问题
🛠️其他更新说明
- 为 storage 模块增加 pylint
- 为 rag 模块增加 pylint
✨官方文档地址
:::color2 英文
:::
:::color2 中文
:::