feat: Added Follow Up Qns Logic

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2025-07-10 14:37:31 -07:00
parent d611bd6303
commit f7fe20219b
6 changed files with 466 additions and 10 deletions

View file

@ -17,6 +17,10 @@ class StreamingService:
{
"type": "ANSWER",
"content": []
},
{
"type": "FURTHER_QUESTIONS",
"content": []
}
]
# It is used to send annotations to the frontend
@ -69,4 +73,17 @@ class StreamingService:
self.message_annotations[2]["content"] = answer
return self.message_annotations
def only_update_further_questions(self, further_questions: List[Dict[str, Any]]) -> str:
"""
Update the further questions annotation
Args:
further_questions: List of further question objects with id and question fields
Returns:
str: The updated annotations
"""
self.message_annotations[3]["content"] = further_questions
return self.message_annotations