This commit is contained in:
Cold
2025-11-27 17:38:42 +08:00
committed by 张斌
parent c75166912d
commit fb0cb27d1d
10 changed files with 437 additions and 92 deletions

View File

@@ -5,7 +5,10 @@ import (
"fmt"
)
// Session 结构体
// 会话管理
// 参考: https://ragflow.com.cn/docs/dev/http_api_reference#会话管理
// Session 会话结构体
type Session struct {
Id string `json:"id"`
Name string `json:"name"`
@@ -116,8 +119,9 @@ func (c *Client) ListSessions(ctx context.Context, chatId string, req *ListSessi
params["user_id"] = req.UserId
}
for k, v := range params {
path += fmt.Sprintf("%s=%v&", k, v)
query := buildQueryString(params)
if query != "" {
path += "?" + query
}
var res ListSessionsRes