fix: remote image not display in answer node (#6867)
This commit is contained in:
parent
14367ddc09
commit
29e3c3061c
2 changed files with 4 additions and 1 deletions
|
|
@ -2,6 +2,7 @@ from typing import Any
|
|||
|
||||
from duckduckgo_search import DDGS
|
||||
|
||||
from core.file.file_obj import FileTransferMethod
|
||||
from core.tools.entities.tool_entities import ToolInvokeMessage
|
||||
from core.tools.tool.builtin_tool import BuiltinTool
|
||||
|
||||
|
|
@ -21,6 +22,7 @@ class DuckDuckGoImageSearchTool(BuiltinTool):
|
|||
response = DDGS().images(**query_dict)
|
||||
result = []
|
||||
for res in response:
|
||||
res['transfer_method'] = FileTransferMethod.REMOTE_URL
|
||||
msg = ToolInvokeMessage(type=ToolInvokeMessage.MessageType.IMAGE_LINK,
|
||||
message=res.get('image'),
|
||||
save_as='',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue