繁體中文
cURL
curl --request POST \ --url https://api.pathors.com/project/{projectId}/session/search \ --header 'Authorization: <authorization>' \ --header 'Content-Type: application/json' \ --data ' { "search_string": "<string>", "limit": 123, "offset": 123 } '
{ "results": [ { "sessionId": "<string>", "data": {}, "createdAt": "<string>", "updatedAt": "<string>" } ], "pagination": { "limit": 123, "offset": 123, "total": 123 } }
透過會話資料中的內容匹配來搜尋會話,包括變數和訊息。
https://api.pathors.com
POST /project/{projectId}/session/search
顯示 會話物件
顯示 分頁物件
curl -X POST https://api.pathors.com/project/{projectId}/session/search \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "search_string": "王小明", "limit": 10, "offset": 0 }'
{ "results": [ { "sessionId": "user-123-session-456", "data": { "variables": { "userName": "王小明", "userRole": "admin" }, "messages": [ { "role": "user", "content": "你好" }, { "role": "assistant", "content": "您好,王小明!有什麼可以幫助您的嗎?" } ] }, "createdAt": "2024-01-15T10:30:00.000Z", "updatedAt": "2024-01-15T10:35:00.000Z" }, { "sessionId": "user-456-session-789", "data": { "variables": { "userName": "王小明", "userRole": "user" }, "messages": [] }, "createdAt": "2024-01-14T15:20:00.000Z", "updatedAt": "2024-01-14T15:25:00.000Z" } ], "pagination": { "limit": 10, "offset": 0, "total": 2 } }
updatedAt
limit
offset
{ "error": "search_string is required" }
{ "error": { "message": "Invalid authentication" } }