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 15442b8e1..5f4943abd 100644 --- a/agents-api/agents_api/models/entry/proc_mem_context.py +++ b/agents-api/agents_api/models/entry/proc_mem_context.py @@ -18,7 +18,6 @@ def proc_mem_context_query( Parameters: session_id (UUID), - tool_query_embedding (list[float]), doc_query_embedding (list[float]), tools_confidence (float), docs_confidence (float), @@ -31,7 +30,6 @@ def proc_mem_context_query( """ VECTOR_SIZE = 1024 session_id = str(session_id) - assert len(tool_query_embedding) == len(doc_query_embedding) == VECTOR_SIZE tools_radius: float = 1.0 - tools_confidence docs_radius: float = 1.0 - docs_confidence @@ -41,14 +39,14 @@ def proc_mem_context_query( {{ # Input table for the query # (This is temporary to this query) - input[session_id, tool_query, doc_query] <- [[ + input[session_id, doc_query] <- [[ to_uuid($session_id), - $tool_query_embedding, + # $tool_query_embedding, $doc_query_embedding, ]] - ?[session_id, tool_query, doc_query, agent_id, user_id] := - input[session_id, tool_query, doc_query], + ?[session_id, doc_query, agent_id, user_id] := + input[session_id, doc_query], *session_lookup{{ session_id, agent_id, @@ -59,7 +57,7 @@ def proc_mem_context_query( session_id: Uuid, agent_id: Uuid, user_id: Uuid, - tool_query: , + # tool_query: , doc_query: , }} }} {{ diff --git a/agents-api/agents_api/models/entry/test_entry_queries.py b/agents-api/agents_api/models/entry/test_entry_queries.py index 8a084ed44..04a49ea0e 100644 --- a/agents-api/agents_api/models/entry/test_entry_queries.py +++ b/agents-api/agents_api/models/entry/test_entry_queries.py @@ -173,10 +173,10 @@ def _(): client=client, ), embed_docs_snippets_query( - agent_doc_id, snippet_indices=[0], embeddings=[[1.0] * 768], client=client + agent_doc_id, snippet_indices=[0], embeddings=[[1.0] * 1024], client=client ), embed_docs_snippets_query( - user_doc_id, snippet_indices=[0], embeddings=[[1.0] * 768], client=client + user_doc_id, snippet_indices=[0], embeddings=[[1.0] * 1024], client=client ), ] @@ -185,7 +185,7 @@ def _(): result = proc_mem_context_query( session_id=session_id, tool_query_embedding=[0.9] * 768, - doc_query_embedding=[0.9] * 768, + doc_query_embedding=[0.9] * 1024, client=client, ) diff --git a/agents-api/agents_api/routers/agents/routers.py b/agents-api/agents_api/routers/agents/routers.py index 93378779d..eac718532 100644 --- a/agents-api/agents_api/routers/agents/routers.py +++ b/agents-api/agents_api/routers/agents/routers.py @@ -264,19 +264,19 @@ async def create_agent( if request.tools: functions = [t.function for t in request.tools] - embeddings = await embed( - [ - function_embed_instruction - + f"{function.name}, {function.description}, " - + "required_params:" - + function.parameters.model_dump_json() - for function in functions - ] - ) + # embeddings = await embed( + # [ + # function_embed_instruction + # + f"{function.name}, {function.description}, " + # + "required_params:" + # + function.parameters.model_dump_json() + # for function in functions + # ] + # ) create_tools_query( new_agent_id, functions, - embeddings, + [[0.0] * 768], ) return res @@ -441,20 +441,20 @@ async def create_tool( created_at=resp["created_at"][0], ) - embeddings = await embed( - [ - function_embed_instruction - + request.function.description - + "\nParameters: " - + json.dumps(request.function.parameters.model_dump()) - ] - ) - - embed_functions_query( - agent_id=agent_id, - tool_ids=[tool_id], - embeddings=embeddings, - ) + # embeddings = await embed( + # [ + # function_embed_instruction + # + request.function.description + # + "\nParameters: " + # + json.dumps(request.function.parameters.model_dump()) + # ] + # ) + + # embed_functions_query( + # agent_id=agent_id, + # tool_ids=[tool_id], + # embeddings=embeddings, + # ) return res