mirror of
https://github.com/danswer-ai/danswer.git
synced 2025-06-03 11:40:01 +02:00
Fix typing for previous message
This commit is contained in:
parent
38af12ab97
commit
ea9a9cb553
@ -42,7 +42,7 @@ def translate_danswer_msg_to_langchain(
|
||||
# If the message is a `ChatMessage`, it doesn't have the downloaded files
|
||||
# attached. Just ignore them for now. Also, OpenAI doesn't allow files to
|
||||
# be attached to AI messages, so we must remove them
|
||||
if isinstance(msg, PreviousMessage) and msg.message_type != MessageType.ASSISTANT:
|
||||
if not isinstance(msg, ChatMessage) and msg.message_type != MessageType.ASSISTANT:
|
||||
files = msg.files
|
||||
content = build_content_with_imgs(msg.message, files)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user