Skip to content

Commit

Permalink
Merge pull request #1049 from julep-ai/dev
Browse files Browse the repository at this point in the history
dev -> main
  • Loading branch information
HamadaSalhab authored Jan 13, 2025
2 parents c5cd858 + 3819cfb commit c768ba5
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
from ...common.utils.db_exceptions import common_db_exceptions
from ..utils import pg_query, rewrap_exceptions, wrap_in_class

# FIXME: We should use latest_transitions instead of transitions
# Query to get a paused execution token
get_paused_execution_token_query = """
SELECT * FROM latest_transitions
SELECT * FROM transitions
WHERE
execution_id = $1
AND type = 'wait'
Expand Down
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 c768ba5

Please sign in to comment.