fix: correct dummy tools api call response (#1142)

This commit is contained in:
Robin Goetz
2024-03-12 13:27:31 -04:00
committed by GitHub
parent c9bffc1de5
commit 021e02b65e

View File

@@ -43,7 +43,7 @@ def setup_tools_index_router(server: SyncServer, interface: QueuingInterface, pa
tools = server.ms.list_tools(user_id=user_id)
return ListToolsResponse(tools=tools)
@router.post("/tools", tags=["tools"], response_model=ListToolsResponse)
@router.post("/tools", tags=["tools"], response_model=CreateToolResponse)
async def create_tool(
request: CreateToolRequest = Body(...),
user_id: uuid.UUID = Depends(get_current_user_with_server),
@@ -51,10 +51,6 @@ def setup_tools_index_router(server: SyncServer, interface: QueuingInterface, pa
"""
Create a new tool (dummy route)
"""
return ToolModel(
name="dummy_tool",
json_schema={},
tags=[],
)
return CreateToolResponse(tool=ToolModel(name=request.name, json_schema={}, tags=[], source_code=request.source_code))
return router