mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-09 22:04:47 +00:00
feat: Added Follow Up Qns Logic
This commit is contained in:
parent
d611bd6303
commit
f7fe20219b
6 changed files with 466 additions and 10 deletions
|
@ -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
|
||||
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue