fix: fit gemini

pull/980/head
tcmofashi 2025-05-23 13:48:23 +08:00
parent aa74329e6e
commit d2a3f83bd6
1 changed files with 2 additions and 0 deletions

View File

@ -261,6 +261,8 @@ class ChatManager:
def get_stream(self, stream_id: str) -> Optional[ChatStream]:
"""通过stream_id获取聊天流"""
stream = self.streams.get(stream_id)
if not stream:
return None
if stream_id in self.last_messages:
stream.set_context(self.last_messages[stream_id])
return stream