Skip to main content
POST
/
user
/
practice
/
sessions
새 채팅(세션): 세션 생성 + settings 생성 + class 기준 모델 생성
curl --request POST \
  --url https://api.example.com/user/practice/sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "class_id": 123,
  "project_id": 123,
  "knowledge_ids": [
    123
  ],
  "agent_id": 123,
  "title": "<string>",
  "notes": "<string>"
}
'
{
  "session_id": 123,
  "user_id": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "class_id": 123,
  "project_id": 123,
  "knowledge_ids": [
    123
  ],
  "agent_id": 123,
  "title": "<string>",
  "notes": "<string>",
  "settings": {
    "setting_id": 123,
    "session_id": 123,
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "style_preset": "accurate",
    "style_params": {},
    "generation_params": {},
    "agent_snapshot": {},
    "few_shot_links": [
      {
        "id": 123,
        "setting_id": 123,
        "example_id": 123,
        "sort_order": 123,
        "created_at": "2023-11-07T05:31:56Z",
        "example": {
          "example_id": 123,
          "user_id": 123,
          "input_text": "<string>",
          "output_text": "<string>",
          "is_active": true,
          "created_at": "2023-11-07T05:31:56Z",
          "updated_at": "2023-11-07T05:31:56Z",
          "title": "<string>",
          "meta": {}
        }
      }
    ]
  },
  "responses": [
    {
      "response_id": 123,
      "session_model_id": 123,
      "session_id": 123,
      "model_name": "<string>",
      "prompt_text": "<string>",
      "response_text": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "token_usage": {},
      "latency_ms": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
class_id
integer | null
project_id
integer | null
knowledge_ids
integer[] | null
agent_id
integer | null
title
string | null
notes
string | null

Response

Successful Response

session_id
integer
required
user_id
integer
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
class_id
integer | null
project_id
integer | null
knowledge_ids
integer[]
agent_id
integer | null
title
string | null
notes
string | null
settings
PracticeSessionSettingResponse · object
responses
PracticeResponseResponse · object[]