From be5373c8e98ea719eb9feb1eda838e1a59b28dcc Mon Sep 17 00:00:00 2001 From: Diwank Singh Tomer Date: Mon, 15 Apr 2024 18:12:44 +0530 Subject: [PATCH] fix(agents-api): Disable tool retrieval (for now) Signed-off-by: Diwank Singh Tomer --- .../agents_api/models/agent/create_tools.py | 2 +- .../models/entry/proc_mem_context.py | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/agents-api/agents_api/models/agent/create_tools.py b/agents-api/agents_api/models/agent/create_tools.py index ad85d8549..4496b3747 100644 --- a/agents-api/agents_api/models/agent/create_tools.py +++ b/agents-api/agents_api/models/agent/create_tools.py @@ -31,7 +31,7 @@ def create_tools_query( functions_input: list[list] = [] for function, embedding in zip(functions, embeddings): - parameters = function.parameters.model_dump_json() + parameters = function.parameters.model_dump() functions_input.append( [ str(agent_id), diff --git a/agents-api/agents_api/models/entry/proc_mem_context.py b/agents-api/agents_api/models/entry/proc_mem_context.py index 4c958eded..5c91ed980 100644 --- a/agents-api/agents_api/models/entry/proc_mem_context.py +++ b/agents-api/agents_api/models/entry/proc_mem_context.py @@ -133,17 +133,24 @@ def proc_mem_context_query( # Search for tools ?[role, name, content, token_count, created_at, index] := *_input{{agent_id, tool_query}}, - ~agent_functions:embedding_space {{ + # ~agent_functions:embedding_space {{ + # agent_id, + # name: fn_name, + # description, + # parameters, + # updated_at: created_at | + # query: tool_query, + # k: $k_tools, + # ef: 128, + # radius: $tools_radius, + # bind_distance: distance, + # }}, + *agent_functions {{ agent_id, name: fn_name, description, parameters, - updated_at: created_at | - query: tool_query, - k: $k_tools, - ef: 128, - radius: $tools_radius, - bind_distance: distance, + updated_at: created_at, }}, role = "system",