File tree Expand file tree Collapse file tree 1 file changed +104
-0
lines changed
Expand file tree Collapse file tree 1 file changed +104
-0
lines changed Original file line number Diff line number Diff line change 1+ openapi : 3.0.3
2+ info :
3+ title : GenAI Module API
4+ version : 1.0.0
5+
6+ paths :
7+ /genai/upload :
8+ post :
9+ summary : Upload a file for ingestion
10+ requestBody :
11+ required : true
12+ content :
13+ multipart/form-data :
14+ schema :
15+ $ref : ' #/components/schemas/UploadRequest'
16+ responses :
17+ ' 200 ' :
18+ description : File processed successfully or already uploaded
19+ content :
20+ application/json :
21+ schema :
22+ $ref : ' #/components/schemas/UploadResponse'
23+ ' 400 ' :
24+ description : No file provided
25+ ' 500 ' :
26+ description : Server error during ingestion
27+
28+ /genai/generate :
29+ post :
30+ summary : Generate a recipe response using retrieved context and chat history
31+ requestBody :
32+ required : true
33+ content :
34+ application/json :
35+ schema :
36+ $ref : ' #/components/schemas/GenerateRequest'
37+ responses :
38+ ' 200 ' :
39+ description : AI-generated recipe response
40+ content :
41+ application/json :
42+ schema :
43+ $ref : ' #/components/schemas/GenerateResponse'
44+ ' 400 ' :
45+ description : Missing 'query' or 'messages'
46+ ' 500 ' :
47+ description : Server error during generation
48+
49+ components :
50+ schemas :
51+ UploadRequest :
52+ type : object
53+ properties :
54+ file :
55+ type : string
56+ format : binary
57+ description : The file to upload and ingest
58+ required :
59+ - file
60+
61+ UploadResponse :
62+ type : object
63+ properties :
64+ message :
65+ type : string
66+ error :
67+ type : string
68+
69+ GenerateRequest :
70+ type : object
71+ required :
72+ - query
73+ - messages
74+ properties :
75+ query :
76+ type : string
77+ description : The user's recipe-related query
78+ messages :
79+ type : array
80+ description : Full conversation history
81+ items :
82+ $ref : ' #/components/schemas/ChatMessage'
83+
84+ ChatMessage :
85+ type : object
86+ required :
87+ - role
88+ - content
89+ properties :
90+ role :
91+ type : string
92+ enum : [USER, ASSISTANT]
93+ description : The role in the conversation
94+ content :
95+ type : string
96+ description : The user's message content
97+
98+ GenerateResponse :
99+ type : object
100+ properties :
101+ response :
102+ type : string
103+ error :
104+ type : string
You can’t perform that action at this time.
0 commit comments