"git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "45ecaaf3928cc64a349633226afee712467c4e4b"
Commit 2be14d57 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

fix

parent 61e0a85a
...@@ -92,7 +92,8 @@ class ToolsTable: ...@@ -92,7 +92,8 @@ class ToolsTable:
return tool return tool
else: else:
return None return None
except: except Exception as e:
print(f"Error creating tool: {e}")
return None return None
def get_tool_by_id(self, id: str) -> Optional[ToolModel]: def get_tool_by_id(self, id: str) -> Optional[ToolModel]:
......
...@@ -84,9 +84,10 @@ async def create_new_toolkit( ...@@ -84,9 +84,10 @@ async def create_new_toolkit(
else: else:
raise HTTPException( raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST, status_code=status.HTTP_400_BAD_REQUEST,
detail=ERROR_MESSAGES.FILE_EXISTS, detail=ERROR_MESSAGES.DEFAULT("Error creating toolkit"),
) )
except Exception as e: except Exception as e:
print(e)
raise HTTPException( raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST, status_code=status.HTTP_400_BAD_REQUEST,
detail=ERROR_MESSAGES.DEFAULT(e), detail=ERROR_MESSAGES.DEFAULT(e),
......
...@@ -42,7 +42,7 @@ def get_tools_specs(tools) -> List[dict]: ...@@ -42,7 +42,7 @@ def get_tools_specs(tools) -> List[dict]:
**( **(
{ {
"enum": ( "enum": (
param_annotation.__args__ str(param_annotation.__args__)
if hasattr(param_annotation, "__args__") if hasattr(param_annotation, "__args__")
else None else None
) )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment