mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-10 14:28:57 +00:00
Added Further question component and streaming fix
This commit is contained in:
parent
1318feef66
commit
5197269c43
5 changed files with 92 additions and 61 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue