Skip to content

Commit

Permalink
feat: Updated agents-api/agents_api/models/agent/p
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] committed Apr 13, 2024
1 parent ebd1b1e commit 54922d0
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions agents-api/agents_api/models/agent/patch_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,23 @@
def patch_tool_by_id_query(
agent_id: UUID, tool_id: UUID, function: FunctionDef, embedding: list[float]
) -> pd.DataFrame:
"""
# Execute the datalog query and return the results as a DataFrame
Updates the tool information for a given agent and tool ID in the 'cozodb' database.
Parameters:
- agent_id (UUID): The unique identifier of the agent.
- tool_id (UUID): The unique identifier of the tool to be updated.
- function (FunctionDef): The function definition containing the new tool information.
- embedding (list[float]): The embedding vector associated with the tool.
Returns:
- pd.DataFrame: A DataFrame containing the result of the update operation.
"""
# Agent update query
# Convert the function definition to a dictionary for easier manipulation
function = function.model_dump()
# Prepare the parameters for the datalog query
params = {
"input": [
[
Expand All @@ -24,6 +39,7 @@ def patch_tool_by_id_query(
]
}

# Construct the datalog query for updating the tool information
query = """
input[agent_id, tool_id, name, description, parameters, embedding] <- $input
Expand Down

0 comments on commit 54922d0

Please sign in to comment.