Skip to content

Commit

Permalink
Merge pull request #1048 from julep-ai/x/agent-tools-routes
Browse files Browse the repository at this point in the history
fix(agents-api): enable agent tools endpoints
  • Loading branch information
Ahmad-mtos authored Jan 13, 2025
2 parents 1e7cd34 + 34e3bc5 commit f95dfc0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
14 changes: 5 additions & 9 deletions agents-api/agents_api/routers/agents/__init__.py
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@
# ruff: noqa: F401

from .create_agent import create_agent

# from .create_agent_tool import create_agent_tool
from .create_agent_tool import create_agent_tool
from .create_or_update_agent import create_or_update_agent
from .delete_agent import delete_agent

# from .delete_agent_tool import delete_agent_tool
from .delete_agent_tool import delete_agent_tool
from .get_agent_details import get_agent_details

# from .list_agent_tools import list_agent_tools
from .list_agent_tools import list_agent_tools
from .list_agents import list_agents
from .patch_agent import patch_agent

# from .patch_agent_tool import patch_agent_tool
from .patch_agent_tool import patch_agent_tool
from .router import router
from .update_agent import update_agent
# from .update_agent_tool import update_agent_tool
from .update_agent_tool import update_agent_tool
6 changes: 4 additions & 2 deletions agents-api/agents_api/routers/agents/create_agent_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,12 @@ async def create_agent_tool(
x_developer_id: Annotated[UUID, Depends(get_developer_id)],
data: CreateToolRequest,
) -> ResourceCreatedResponse:
tool = await create_tools_query(
tools = await create_tools_query(
developer_id=x_developer_id,
agent_id=agent_id,
data=[data],
)[0]
)

tool = tools[0]

return ResourceCreatedResponse(id=tool.id, created_at=tool.created_at, jobs=[])

0 comments on commit f95dfc0

Please sign in to comment.