diff --git a/sia/mistral_llm_engine.py b/sia/mistral_llm_engine.py index 68504be..ea002ef 100644 --- a/sia/mistral_llm_engine.py +++ b/sia/mistral_llm_engine.py @@ -46,12 +46,12 @@ class MistralLlmEngine(LlmEngine): try: for chunk in stream_response: if should_stop(): - stream_response.close() + stream_response.response.close() break if content := chunk.data.choices[0].delta.content: yield content finally: - stream_response.close() + stream_response.response.close() def token_count(self, system_prompt: str, main_context: str) -> int: messages = [