mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-18 15:35:56 +08:00
fix: rebaseing to main
This commit is contained in:
parent
83fdb42520
commit
05a43e3e80
@ -49,9 +49,6 @@ class BuiltinTool(Tool):
|
|||||||
:return: the model result
|
:return: the model result
|
||||||
"""
|
"""
|
||||||
# invoke model
|
# invoke model
|
||||||
if self.runtime is None or self.identity is None:
|
|
||||||
raise ValueError("runtime and identity are required")
|
|
||||||
|
|
||||||
return ModelInvocationUtils.invoke(
|
return ModelInvocationUtils.invoke(
|
||||||
user_id=user_id,
|
user_id=user_id,
|
||||||
tenant_id=self.runtime.tenant_id or "",
|
tenant_id=self.runtime.tenant_id or "",
|
||||||
|
@ -76,9 +76,6 @@ class ToolEngine:
|
|||||||
if not isinstance(tool_parameters, dict):
|
if not isinstance(tool_parameters, dict):
|
||||||
raise ValueError(f"tool_parameters should be a dict, but got a string: {tool_parameters}")
|
raise ValueError(f"tool_parameters should be a dict, but got a string: {tool_parameters}")
|
||||||
|
|
||||||
# invoke the tool
|
|
||||||
if tool.identity is None:
|
|
||||||
raise ValueError("tool identity is not set")
|
|
||||||
try:
|
try:
|
||||||
# hit the callback handler
|
# hit the callback handler
|
||||||
agent_tool_callback.on_tool_start(tool_name=tool.entity.identity.name, tool_inputs=tool_parameters)
|
agent_tool_callback.on_tool_start(tool_name=tool.entity.identity.name, tool_inputs=tool_parameters)
|
||||||
@ -207,8 +204,6 @@ class ToolEngine:
|
|||||||
"""
|
"""
|
||||||
Invoke the tool with the given arguments.
|
Invoke the tool with the given arguments.
|
||||||
"""
|
"""
|
||||||
if tool.identity is None:
|
|
||||||
raise ValueError("tool identity is not set")
|
|
||||||
started_at = datetime.now(UTC)
|
started_at = datetime.now(UTC)
|
||||||
meta = ToolInvokeMeta(
|
meta = ToolInvokeMeta(
|
||||||
time_cost=0.0,
|
time_cost=0.0,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user