mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-19 06:30:10 +08:00
53 lines
1.4 KiB
HTTP
53 lines
1.4 KiB
HTTP
|
|
@host=http://localhost:23333
|
|
@token=cs-sk-af798ed4-7cf5-4fd7-ae4b-df203b164194
|
|
@agent_id=agent_1757663884173_4tyeh3vqq
|
|
|
|
### List Sessions
|
|
GET {{host}}/v1/agents/{{agent_id}}/sessions
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
|
|
### Create Session
|
|
POST {{host}}/v1/agents/{{agent_id}}/sessions
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"name": "Code Review Session",
|
|
"user_goal": "Review the newly implemented feature for bugs and improvements"
|
|
}
|
|
|
|
### Get Session Details
|
|
GET {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815260195_eldvompnv
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
### Delete Session
|
|
DELETE {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815245456_tfs6oogl0
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
### Update Session
|
|
PUT {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815281790_q4yxgdk74
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"name": "Code Review Session 1",
|
|
"user_goal": "Review the newly implemented feature for bugs and improvements"
|
|
}
|
|
|
|
|
|
### Create Session Message
|
|
POST {{host}}/v1/agents/{{agent_id}}/sessions/session_1757815260195_eldvompnv/messages
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"role": "assistant",
|
|
"content": "Sure! Please provide the code or details of the feature you would like me to review.",
|
|
"parent_message_id": null
|
|
}
|