mirror of
				https://github.com/open-webui/open-webui
				synced 2025-06-26 18:26:48 +00:00 
			
		
		
		
	fix
This commit is contained in:
		
							parent
							
								
									61e0a85aed
								
							
						
					
					
						commit
						2be14d57bf
					
				@ -92,7 +92,8 @@ class ToolsTable:
 | 
			
		||||
                return tool
 | 
			
		||||
            else:
 | 
			
		||||
                return None
 | 
			
		||||
        except:
 | 
			
		||||
        except Exception as e:
 | 
			
		||||
            print(f"Error creating tool: {e}")
 | 
			
		||||
            return None
 | 
			
		||||
 | 
			
		||||
    def get_tool_by_id(self, id: str) -> Optional[ToolModel]:
 | 
			
		||||
 | 
			
		||||
@ -84,9 +84,10 @@ async def create_new_toolkit(
 | 
			
		||||
            else:
 | 
			
		||||
                raise HTTPException(
 | 
			
		||||
                    status_code=status.HTTP_400_BAD_REQUEST,
 | 
			
		||||
                    detail=ERROR_MESSAGES.FILE_EXISTS,
 | 
			
		||||
                    detail=ERROR_MESSAGES.DEFAULT("Error creating toolkit"),
 | 
			
		||||
                )
 | 
			
		||||
        except Exception as e:
 | 
			
		||||
            print(e)
 | 
			
		||||
            raise HTTPException(
 | 
			
		||||
                status_code=status.HTTP_400_BAD_REQUEST,
 | 
			
		||||
                detail=ERROR_MESSAGES.DEFAULT(e),
 | 
			
		||||
 | 
			
		||||
@ -42,7 +42,7 @@ def get_tools_specs(tools) -> List[dict]:
 | 
			
		||||
                            **(
 | 
			
		||||
                                {
 | 
			
		||||
                                    "enum": (
 | 
			
		||||
                                        param_annotation.__args__
 | 
			
		||||
                                        str(param_annotation.__args__)
 | 
			
		||||
                                        if hasattr(param_annotation, "__args__")
 | 
			
		||||
                                        else None
 | 
			
		||||
                                    )
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user