Mbonea commited on
Commit
5ac12fa
1 Parent(s): 3c8e2b5

changed routes and schema

Browse files
Files changed (2) hide show
  1. App/Chat/ChatRoutes.py +1 -1
  2. App/Chat/Schema.py +1 -1
App/Chat/ChatRoutes.py CHANGED
@@ -29,7 +29,7 @@ async def fetch_and_forward_request(request_body):
29
  @chat_router.post("/Chat")
30
  async def generate_response(req:ChatRequest):
31
  assistant=GenerativeAIAssistant()
32
- return await assistant.generate_message(req.messages.__dict__,req.taskId)
33
 
34
 
35
  @chat_router.get("/summarize/{task_id}")
 
29
  @chat_router.post("/Chat")
30
  async def generate_response(req:ChatRequest):
31
  assistant=GenerativeAIAssistant()
32
+ return await assistant.generate_message(req.messages,req.taskId)
33
 
34
 
35
  @chat_router.get("/summarize/{task_id}")
App/Chat/Schema.py CHANGED
@@ -8,5 +8,5 @@ class Message(BaseModel):
8
 
9
 
10
  class ChatRequest(BaseModel):
11
- messages: list[Message]
12
  taskId: str
 
8
 
9
 
10
  class ChatRequest(BaseModel):
11
+ messages: list[dict]
12
  taskId: str