mirror of https://github.com/Mai-with-u/MaiBot.git
fix: fit gemini
parent
aa74329e6e
commit
d2a3f83bd6
|
|
@ -261,6 +261,8 @@ class ChatManager:
|
||||||
def get_stream(self, stream_id: str) -> Optional[ChatStream]:
|
def get_stream(self, stream_id: str) -> Optional[ChatStream]:
|
||||||
"""通过stream_id获取聊天流"""
|
"""通过stream_id获取聊天流"""
|
||||||
stream = self.streams.get(stream_id)
|
stream = self.streams.get(stream_id)
|
||||||
|
if not stream:
|
||||||
|
return None
|
||||||
if stream_id in self.last_messages:
|
if stream_id in self.last_messages:
|
||||||
stream.set_context(self.last_messages[stream_id])
|
stream.set_context(self.last_messages[stream_id])
|
||||||
return stream
|
return stream
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue