File size: 1,078 Bytes
36a4021
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
### login
POST http://127.0.0.1:8080/chatgpt/login
Content-Type: application/json

{
  "username": "{{username}}",
  "password": "{{password}}"
}

### get conversations
GET http://127.0.0.1:8080/chatgpt/conversations
Authorization: Bearer {{accessToken}}

### create conversation
POST http://127.0.0.1:8080/chatgpt/conversation
Authorization: Bearer {{accessToken}}
Content-Type: application/json
Accept: text/event-stream

{
  "action": "next",
  "messages": [
    {
      "id": "{{$random.uuid}}",
      "author": {
        "role": "user"
      },
      "content": {
        "content_type": "text",
        "parts": [
          "hello"
        ]
      },
      "metadata": {}
    }
  ],
  "model": "gpt-4",
  "timezone_offset_min": -480,
  "history_and_training_disabled": false
}

> {%
    response.body.onEachLine((data) => {
        client.log(data.toString());
    })
%}

### get models
GET http://127.0.0.1:8080/chatgpt/models
Authorization: Bearer {{accessToken}}

### check account
GET http://127.0.0.1:8080/chatgpt/accounts/check
Authorization: Bearer {{accessToken}}