修改rag的实体类

This commit is contained in:
Cold
2025-12-02 14:59:07 +08:00
committed by 张斌
parent cd3571554f
commit 5d4c8c8711
6 changed files with 78 additions and 40 deletions

View File

@@ -82,10 +82,10 @@ type ListChatsReq struct {
}
// ListChatsRes 列出聊天助手响应
// 注意API 不返回 total 字段,仅返回 data 数组
type ListChatsRes struct {
Code int `json:"code"`
Data []*Chat `json:"data"`
Total int `json:"total"` // API 文档中未明确 total 字段,但通常列表接口会有
Code int `json:"code"` // 状态码0 表示成功
Data []*Chat `json:"data"` // 聊天助手列表
}
// DeleteChatsReq 删除聊天助手请求
@@ -111,7 +111,7 @@ func (c *Client) CreateChat(ctx context.Context, req *CreateChatReq) (*Chat, err
// ListChats 列出聊天助手
func (c *Client) ListChats(ctx context.Context, req *ListChatsReq) (*ListChatsRes, error) {
path := "/api/v1/chats?"
path := "/api/v1/chats"
params := map[string]interface{}{}
if req.Page > 0 {
params["page"] = req.Page