-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapi-test.http
More file actions
135 lines (89 loc) · 3.51 KB
/
Copy pathapi-test.http
File metadata and controls
135 lines (89 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
### api/config/models
# 查询模型列表
GET http://localhost:8989/api/config/models
### api/config/tools
# 查询内置工具列表
GET http://localhost:8989/api/config/tools
### api/config/skills
# 查询可用Skills列表
GET http://localhost:8989/api/config/skills
### api/config/reload
# 重新加载配置
POST http://localhost:8989/api/config/reload
### api/session/page
# 查询会话分页列表(按更新时间倒序)
GET http://localhost:8989/api/session/page
Content-Type: application/json
{ "limit": 100 }
### api/session/new
# 新建会话,纯聊天模式,不加载工具
POST http://localhost:8989/api/session/new
Content-Type: application/json
{ "sessionId": "deepseek:chat", "modelId": "deepseek-v4-flash", "tools": [] }
### api/session/new
# 查看会话信息
GET http://localhost:8989/api/session/deepseek:agent
### api/session/{sessionId}/message/all
# 查询会话全部历史消息列表
GET http://localhost:8989/api/session/deepseek:agent/message/all
### api/session/chat
# 会话中聊天
POST http://localhost:8989/api/session/chat
Content-Type: application/json
{ "sessionId": "deepseek:chat", "content": "你是什么模型?" }
### api/session/{sessionId}/req-resp/{messageId}
# 查询会话中某用户消息及其对应生成的响应消息列表
GET http://localhost:8989/api/session/deepseek:agent/req-resp/bd97bb3898a7d30f65de5dd2c9aef505
### api/session/new
# 新建会话,agent 模式
POST http://localhost:8989/api/session/new
Content-Type: application/json
{ "sessionId": "deepseek:agent", "modelId": "deepseek-v4-flash", "tools": ["FULL"] }
### api/session/chat
# 会话中聊天
POST http://localhost:8989/api/session/chat
Content-Type: application/json
{ "sessionId": "deepseek:agent", "content": "查询杭州天气" }
### api/session/chat
# 会话中聊天
POST http://localhost:8989/api/session/chat
Content-Type: application/json
{ "sessionId": "deepseek:agent", "content": "~/Downloads 目录下的 pdf 文件数量?" }
### api/session/new
# 新建会话,纯聊天模式,不加载工具
POST http://localhost:8989/api/session/new
Content-Type: application/json
{ "sessionId": "glm:chat", "modelId": "glm-5", "tools": []}
### api/session/chat
# 会话中聊天
POST http://localhost:8989/api/session/chat
Content-Type: application/json
{ "sessionId": "glm:chat", "content": "你是什么模型?" }
### api/session/chat
# 会话中聊天
POST http://localhost:8989/api/session/chat
Content-Type: application/json
{ "sessionId": "openai:chat", "content": "你是什么模型?" }
### api/session/chat/stream
# 会话中聊天 (流式对话)
POST http://localhost:8989/api/session/chat/stream
Content-Type: application/json
{ "sessionId": "deepseek:chat", "content": "你是什么模型?" }
### api/knowledge/{kb}/upload/file
# 上传文件到知识库,文件为 `README.md`
POST http://localhost:8989/api/knowledge/kb/upload/file
Content-Type: multipart/form-data; boundary=boundary
--boundary
Content-Disposition: form-data; name="file"; filename="README.md"
< ./README.md
### api/knowledge/{kb}/doc/list
# 查询知识库文档列表
GET http://localhost:8989/api/knowledge/kb/doc/list
### api/knowledge/{kb}/{docId}
# 查询知识库文档详情
GET http://localhost:8989/api/knowledge/kb/69a4d03f736d649a09ee4b0bf8763bba
### api/session/chat
# 会话中聊天,使用知识库进行增强
POST http://localhost:8989/api/session/chat
Content-Type: application/json
{ "sessionId": "deepseek:chat", "content": "MyAgent 项目有哪些内置工具?", "knowledgeId": "kb" }