fix: trim file extension

This commit is contained in:
Yeuoly 2024-03-18 19:59:54 +08:00
parent 197c0bb1a3
commit e7d6def1e8
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ class ToolNode(BaseNode):
filename = response.save_as or url.split('/')[-1]
# get tool file id
tool_file_id = url.split('/')[-1]
tool_file_id = url.split('/')[-1].split('.')[0]
result.append(FileVar(
tenant_id=self.tenant_id,
type=FileType.IMAGE,
@ -114,7 +114,7 @@ class ToolNode(BaseNode):
))
elif response.type == ToolInvokeMessage.MessageType.BLOB:
# get tool file id
tool_file_id = response.message.split('/')[-1]
tool_file_id = response.message.split('/')[-1].split('.')[0]
result.append(FileVar(
tenant_id=self.tenant_id,
type=FileType.IMAGE,