Skip to content

Commit 90ecfe5

Browse files
authored
添加 chat 接口 (#30)
* 添加 chat 接口 * add test * 添加 handler mock * fix the ci
1 parent 8fe7791 commit 90ecfe5

File tree

11 files changed

+397
-69
lines changed

11 files changed

+397
-69
lines changed

.DS_Store

8 KB
Binary file not shown.

api/proto/chat/v1/chat.proto

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ message StreamRequest {
2525
string key = 5;
2626
}
2727

28+
message ChatRequest {
29+
string sn = 1;
30+
Message msg = 2;
31+
}
32+
2833
message StreamResponse {
2934
bool final = 1;
3035
string reasoning_content = 2;
@@ -39,10 +44,10 @@ service Service {
3944
// 会更新传入过来的字段,没有传递的字段将会被忽略
4045
// 如果没有对应的 SN,则会执行创建的语义
4146
rpc Save(SaveRequest) returns (SaveResponse);
42-
4347
// 这部分是真的发起会话
4448
// Stream 是采用流式接口发起一轮对话
4549
rpc Stream(StreamRequest) returns (stream StreamResponse);
50+
rpc Chat(ChatRequest) returns (ChatResponse);
4651
}
4752

4853
message SaveRequest {

0 commit comments

Comments
 (0)