2.8 KiB
2.8 KiB
> 简体中文 < | English
环境搭建
git clone xxxxxx
npm install pm2 -g
yarn
pip install -r requirements.txt
下载最新版本的 Lagrange.core ,并完成初始化。完成后根目录为
📁bot
📁rag
📁app
├─📁publish
│ ├─🏷️...
│ ├─🏷️appsettings.json
│ └─🪛Lagrange.OneBot
└─🎗️...
架构
graph TB
core(Lagrage.Core)
onebot(Lagrange.onebot)
vecdb(vecdb)
llm(LLM)
intent(intent tree)
core(Lagrange.Core) --> onebot(Lagrange.onebot)
onebot -->|query| intent
intent -->|intent| onebot
subgraph Intent Recognition
intent -->|query| vecdb
vecdb -->|ktop| intent
intent -->|ktop,query| llm
llm -->|intent| intent
end
subgraph execution
onebot --> command{intent}
command --> query
command --> upload
command --> ...
end
subgraph third party
LLM
Google
server
end
query --> LLM
query --> Google
upload --> server
Lagrange.onebot
--> 📁botvecdb
--> 📁ragintent tree
--> 📁prompt
接口规范
http 接口满足 HttpResponse
所示。
interface HttpResponse<T> {
code: number,
data: CommonResponse<T>
}
interface CommonResponse<T> {
code: number,
data?: T,
msg?: string
}
开发须知
- 非必要,请不要随意宣传本项目。
- 虽然曾经无数个 QQ 相关的项目都死了,但是基本的 API 端口算是传承了下来。拉格朗日的返回类型,请参考 go-cqhttp 帮助中心 - API 篇 中的内容。