-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathopenapi.json
More file actions
96 lines (96 loc) · 2.24 KB
/
openapi.json
File metadata and controls
96 lines (96 loc) · 2.24 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
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
{
"openapi": "3.0.0",
"info": {
"title": "Duda RAG API",
"version": "1.0.0",
"description": "API of RAG using Pinecone and WatsonX, orchestrated by LangChain"
},
"servers": [
{
"url": "https://psychic-guide-7jww7p4wp93rp5p-8000.app.github.dev"
}
],
"paths": {
"/api/chat": {
"post": {
"summary": "Receive a query and return a response using RAG",
"operationId": "post_chatbot",
"tags": ["api"],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatQuery"
}
}
}
},
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatResponse"
}
}
}
},
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
},
"500": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"ChatQuery": {
"type": "object",
"required": ["query"],
"properties": {
"query": {
"type": "string",
"description": "Prompt from user"
}
}
},
"ChatResponse": {
"type": "object",
"properties": {
"response": {
"type": "string",
"description": "Response generated by the RAG model"
}
}
},
"ErrorResponse": {
"type": "object",
"properties": {
"error": {
"type": "string",
"description": "Error message"
}
}
}
}
}
}