mirror of
https://github.com/MODSetter/SurfSense.git
synced 2025-09-04 11:39:19 +00:00
Removed deprecated streaming methods
This commit is contained in:
parent
53a79d9b65
commit
56432c388c
1 changed files with 1 additions and 44 deletions
|
@ -175,47 +175,4 @@ class StreamingService:
|
||||||
"totalTokens": total_tokens
|
"totalTokens": total_tokens
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return f'd:{json.dumps(completion_data)}\n'
|
return f'd:{json.dumps(completion_data)}\n'
|
||||||
|
|
||||||
|
|
||||||
# DEPRECATED METHODS: Keep for backward compatibility but mark as deprecated
|
|
||||||
def only_update_terminal(self, text: str, message_type: str = "info") -> str:
|
|
||||||
"""
|
|
||||||
DEPRECATED: Use format_terminal_info_delta() instead for optimal streaming
|
|
||||||
"""
|
|
||||||
self.message_annotations[0]["content"].append({
|
|
||||||
"id": self.terminal_idx,
|
|
||||||
"text": text,
|
|
||||||
"type": message_type
|
|
||||||
})
|
|
||||||
self.terminal_idx += 1
|
|
||||||
return self.message_annotations
|
|
||||||
|
|
||||||
def only_update_sources(self, sources: List[Dict[str, Any]]) -> str:
|
|
||||||
"""
|
|
||||||
DEPRECATED: Use format_sources_delta() instead for optimal streaming
|
|
||||||
"""
|
|
||||||
self.message_annotations[1]["content"] = sources
|
|
||||||
return self.message_annotations
|
|
||||||
|
|
||||||
def only_update_answer(self, answer: List[str]) -> str:
|
|
||||||
"""
|
|
||||||
DEPRECATED: Use format_answer_delta() or format_answer_annotation() instead for optimal streaming
|
|
||||||
"""
|
|
||||||
self.message_annotations[2]["content"] = answer
|
|
||||||
return self.message_annotations
|
|
||||||
|
|
||||||
def only_update_further_questions(self, further_questions: List[Dict[str, Any]]) -> str:
|
|
||||||
"""
|
|
||||||
DEPRECATED: Use format_further_questions_delta() instead for optimal streaming
|
|
||||||
|
|
||||||
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
Reference in a new issue