forked from kiecodes/kiecodes-gpt-webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
rest-api.http
41 lines (32 loc) · 961 Bytes
/
rest-api.http
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
### New Thread
POST http://localhost:8000/api/new
Accept: application/json
> {%
client.global.set("thread_id", response.body.thread_id)
client.global.set("run_id", response.body.run_id)
%}
### Retrieve Thread
GET http://localhost:8000/api/threads/{{thread_id}}
Accept: application/json
### Run status
GET http://localhost:8000/api/threads/{{thread_id}}/runs/{{run_id}}
Accept: application/json
### New Reply
POST http://localhost:8000/api/threads/{{thread_id}}
Accept: application/json
Content-Type: application/json
{ "content": "Does kie have video with Phillips Hue?" }
> {%
client.global.set("thread_id", response.body.thread_id)
client.global.set("run_id", response.body.run_id)
%}
### Submit Tool Output
POST http://localhost:8000/api/threads/{{thread_id}}/runs/{{run_id}}/tool
Accept: application/json
Content-Type: application/json
[
{
"tool_call_id": "call_WNpt3enka45nnK8MMFkSDetd",
"output": "{'success': true}"
}
]