修改rag的实体类
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user