修改rag的实体类
This commit is contained in:
@@ -43,10 +43,10 @@ type ListSessionsReq struct {
|
||||
}
|
||||
|
||||
// ListSessionsRes 列出会话响应
|
||||
// 注意:API 不返回 total 字段,仅返回 data 数组
|
||||
type ListSessionsRes struct {
|
||||
Code int `json:"code"`
|
||||
Data []*Session `json:"data"`
|
||||
Total int `json:"total"` // API 文档未明确
|
||||
Code int `json:"code"` // 状态码,0 表示成功
|
||||
Data []*Session `json:"data"` // 会话列表
|
||||
}
|
||||
|
||||
// DeleteSessionsReq 删除会话请求
|
||||
@@ -93,7 +93,7 @@ func (c *Client) CreateSession(ctx context.Context, chatId string, req *CreateSe
|
||||
|
||||
// ListSessions 列出会话
|
||||
func (c *Client) ListSessions(ctx context.Context, chatId string, req *ListSessionsReq) (*ListSessionsRes, error) {
|
||||
path := fmt.Sprintf("/api/v1/chats/%s/sessions?", chatId)
|
||||
path := fmt.Sprintf("/api/v1/chats/%s/sessions", chatId)
|
||||
params := map[string]interface{}{}
|
||||
if req.Page > 0 {
|
||||
params["page"] = req.Page
|
||||
|
||||
Reference in New Issue
Block a user