Repository navigation
Expand file tree
/
Copy pathrequests.http
More file actions
67 lines (47 loc) · 1.61 KB
/
Copy pathrequests.http
File metadata and controls
67 lines (47 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
### 0. Health Check
GET http://localhost:3000/health
###
### 1. Pricing Rates & Supported Models
GET http://localhost:3000/pricing
###
### 2. Create a new chat session (Default Model: gpt-4o-mini)
# @name createSession
POST http://localhost:3000/sessions
Content-Type: application/json
{
"model": "gpt-4o-mini",
"title": "OpenAI Assistant Demo",
"system_prompt": "You are a concise, helpful assistant."
}
###
### 3. Send message using default session model
@sessionId = {{createSession.response.body.id}}
POST http://localhost:3000/sessions/{{sessionId}}/messages
Content-Type: application/json
{
"content": "Привіт! Назви 3 основні переваги використання Node.js."
}
###
### 4. Send message with specific MODEL OVERRIDE (e.g., gpt-4o)
POST http://localhost:3000/sessions/{{sessionId}}/messages
Content-Type: application/json
{
"content": "Проаналізуй першу перевагу більш глибоко.",
"model": "gpt-4o"
}
###
### 5. Get Session details with active history and accumulated cost
GET http://localhost:3000/sessions/{{sessionId}}
###
### 6. RESET Session context (Session ID stays the same, cost resets to 0, history is refreshed)
POST http://localhost:3000/sessions/{{sessionId}}/reset
###
### 7. Send new message after reset (Fresh context)
POST http://localhost:3000/sessions/{{sessionId}}/messages
Content-Type: application/json
{
"content": "Починаємо нову тему. Що таке Docker?"
}
###
### 8. Verify active history contains only post-reset messages and cost starts from 0
GET http://localhost:3000/sessions/{{sessionId}}