Added Further question component and streaming fix

This commit is contained in:
Utkarsh-Patel-13 2025-07-25 15:40:29 -07:00
parent 1318feef66
commit 5197269c43
5 changed files with 92 additions and 61 deletions

View file

@ -132,7 +132,14 @@ class StreamingService:
self.message_annotations[3]["content"] = further_questions
# Return only the delta annotation
annotation = {"type": "FURTHER_QUESTIONS", "content": further_questions}
annotation = {
"type": "FURTHER_QUESTIONS",
"data": [
question.get("question", "")
for question in further_questions
if question.get("question", "") != ""
],
}
return f"8:[{json.dumps(annotation)}]\n"
def format_text_chunk(self, text: str) -> str: