Fix/assistant none type (#2145)

This commit is contained in:
Yeuoly 2024-01-24 00:13:04 +08:00 committed by GitHub
parent 9525ca08b9
commit 27828f44b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -128,8 +128,9 @@ class MessageFileParser:
# group by file type and convert file args or message files to FileObj
for file in files:
if file.belongs_to == FileBelongsTo.ASSISTANT.value:
continue
if isinstance(file, MessageFile):
if file.belongs_to == FileBelongsTo.ASSISTANT.value:
continue
file_obj = self._to_file_obj(file, file_upload_config)
if file_obj.type not in type_file_objs: