mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2025-12-26 03:31:24 +08:00
49 lines
1.2 KiB
HTTP
49 lines
1.2 KiB
HTTP
|
|
@host=http://localhost:23333
|
|
@token=cs-sk-af798ed4-7cf5-4fd7-ae4b-df203b164194
|
|
@agent_id=agent_1758092281575_tn9dxio9k
|
|
@session_id=session_1758092305477_b0g0cmnkp
|
|
|
|
### 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
|
|
|
|
{}
|
|
|
|
### Get Session Details
|
|
GET {{host}}/v1/agents/{{agent_id}}/sessions/{{session_id}}
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
### Delete Session
|
|
DELETE {{host}}/v1/agents/{{agent_id}}/sessions/{{session_id}}
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
### Update Session
|
|
PUT {{host}}/v1/agents/{{agent_id}}/sessions/{{session_id}}
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"name": "Code Review Session 1",
|
|
"instructions": "Review the newly implemented feature for bugs and improvements"
|
|
}
|
|
|
|
|
|
### Create Session Message
|
|
POST {{host}}/v1/agents/{{agent_id}}/sessions/{{session_id}}/messages
|
|
Authorization: Bearer {{token}}
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"content": "a joke about programmers"
|
|
}
|