diff --git a/surfsense_backend/app/services/streaming_service.py b/surfsense_backend/app/services/streaming_service.py index ce1188a..ab42c3b 100644 --- a/surfsense_backend/app/services/streaming_service.py +++ b/surfsense_backend/app/services/streaming_service.py @@ -175,47 +175,4 @@ class StreamingService: "totalTokens": total_tokens } } - 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 - - \ No newline at end of file + return f'd:{json.dumps(completion_data)}\n' \ No newline at end of file