fix: DuckDuckGo image search tool error (#5606)

This commit is contained in:
非法操作
2024-06-26 13:21:40 +08:00
committed by GitHub
parent 43335b5c87
commit b8926ea267
8 changed files with 26 additions and 16 deletions

View File

@@ -2,7 +2,7 @@ import json
from copy import deepcopy
from datetime import datetime, timezone
from mimetypes import guess_type
from typing import Union
from typing import Any, Union
from yarl import URL
@@ -250,7 +250,7 @@ class ToolEngine:
agent_message: Message,
invoke_from: InvokeFrom,
user_id: str
) -> list[tuple[MessageFile, bool]]:
) -> list[tuple[Any, str]]:
"""
Create message file
@@ -291,7 +291,7 @@ class ToolEngine:
db.session.refresh(message_file)
result.append((
message_file,
message_file.id,
message.save_as
))