feedback added in chat
This commit is contained in:
@@ -89,6 +89,7 @@ class ChatRequest(BaseModel):
|
||||
class ChatResponse(BaseModel):
|
||||
message: str
|
||||
end: bool
|
||||
pop_theme_generation:bool
|
||||
error: Optional[str] = None
|
||||
|
||||
|
||||
@@ -215,7 +216,7 @@ async def chat_endpoint(
|
||||
print("Generating PDF from response...") # Debugging print
|
||||
print(f"Calling AI chat function...") # Debugging print
|
||||
response = ai_chat(
|
||||
query=f"NOW GENERATE THE STARTPOP FRAME WORK ,THEME_GENERATION_STATE: {request.generate_theme}",
|
||||
query=request.query,
|
||||
conversation_id=request.conversation_id,
|
||||
theme_id=request.theme_id,
|
||||
resume=resume_docs,
|
||||
@@ -259,6 +260,7 @@ async def chat_endpoint(
|
||||
return ChatResponse(
|
||||
message=parsed_response.get("message", ""),
|
||||
end=parsed_response.get("end", "no") == "yes",
|
||||
pop_theme_generation=parsed_response.get("pop_theme_generation","no") == "yes",
|
||||
error=None
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user