mirror of
https://github.com/langgenius/dify.git
synced 2024-11-16 11:42:29 +08:00
replace message content type list to string when file_objs is empty .. (#2745)
This commit is contained in:
parent
bd26c933d2
commit
237bb8514e
|
@ -47,6 +47,9 @@ class TokenBufferMemory:
|
|||
files, message.app_model_config
|
||||
)
|
||||
|
||||
if not file_objs:
|
||||
prompt_messages.append(UserPromptMessage(content=message.query))
|
||||
else:
|
||||
prompt_message_contents = [TextPromptMessageContent(data=message.query)]
|
||||
for file_obj in file_objs:
|
||||
prompt_message_contents.append(file_obj.prompt_message_content)
|
||||
|
|
Loading…
Reference in New Issue
Block a user