fix: tools

This commit is contained in:
Yeuoly 2024-04-03 13:46:29 +08:00
parent 20394b3231
commit ccb67bffc4
No known key found for this signature in database
GPG Key ID: A66E7E320FB19F61
2 changed files with 2 additions and 2 deletions

View File

@ -36,7 +36,7 @@ class DifyAgentCallbackHandler(BaseCallbackHandler, BaseModel):
print_text("\n[on_tool_end]\n", color=self.color)
print_text("Tool: " + tool_name + "\n", color=self.color)
print_text("Inputs: " + str(tool_inputs) + "\n", color=self.color)
print_text("Outputs: " + str(tool_outputs) + "\n", color=self.color)
print_text("Outputs: " + str(tool_outputs)[:1000] + "\n", color=self.color)
print_text("\n")
def on_tool_error(

View File

@ -353,7 +353,7 @@ class ToolManageService:
).first()
if provider is None:
raise ValueError(f'you have not added provider {provider}')
return {}
provider_controller = ToolManager.get_builtin_provider(provider.provider)
tool_configuration = ToolConfigurationManager(tenant_id=tenant_id, provider_controller=provider_controller)