forked from hyunwoongko/openchat
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Swagger.yaml
119 lines (100 loc) · 3.46 KB
/
Swagger.yaml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
openapi: 3.0.0 # Open api version
info:
title: OpenChat
version: "v0.2"
contact:
name: AInizer - Lee hoseop
description: |
Opensource chatting framework for generative models.
---
How to use:
* Fill the text. This is the message you will send to the AI.
* After a few seconds, the AI will respond.
---
And you can use this in [demo page](https://main-openchat-fpem123.endpoint.ainize.ai/).
Original Git repo >> [hyunwoongko/openchat](https://github.com/hyunwoongko/openchat)
servers:
- url: https://main-openchat-fpem123.endpoint.ainize.ai/
paths:
/base64:
post:
requestBody:
required: true
description: |
This request can get the base64 encoded user_id.
user_id: Kim
curl example
curl -X POST "https://main-openchat-fpem123.endpoint.ainize.ai/base64" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "user_id=Kim"
--
content:
multipart/form-data:
schema:
type: object
properties:
user_id:
type: string
description: "User id to get base64 user_id for chat."
required:
- user_id
responses: # Set response
'200':
description: "Successful Response"
content:
application/json:
schema:
type: object
'400':
description: "Bad Request Error"
'429':
description: "Too many requests"
'500':
description: "Server-side Error"
/send/S2lt:
post:
requestBody:
required: true
description: |
This request sends a message to the AI.
Request body example
bot_id: Mr.Bot
text: Hey, What are you going to do?
topic: weekend
agent: DIALOGPT.MEDIUM
curl example
You can change the "S2lt" of the url to any name you want.
curl -X POST "https://main-openchat-fpem123.endpoint.ainize.ai/send/S2lt" -H "accept: application/json" -H "Content-Type: multipart/form-data" -F "bot_id=Mr.Bot" -F "text=Hey, What are you going to do?" -F "topic=weekend" -F "agent=DIALOGPT.MEDIUM"
--
content:
multipart/form-data:
schema:
type: object
properties:
bot_id:
type: string
description: "This is the name of the bot."
text:
type: string
description: "This is the message you will send to the AI."
topic:
type: string
description: "This is the topic of the chat."
agent:
type: string
enum: [ "blender.small", "blender.medium", 'dialogpt.small',
'dialogpt.medium', 'gptneo.small', 'gptneo.large']
description: "The model type of the Bot you want to chat with."
required:
- text
responses: # Set response
'200':
description: "Successful Response"
content:
application/json:
schema:
type: object
'400':
description: "Bad Request Error"
'429':
description: "Too many requests"
'500':
description: "Server-side Error"