Skip to content

Commit

Permalink
fix: Set IDs to null wherever it's appropriate
Browse files Browse the repository at this point in the history
  • Loading branch information
whiterabbit1983 committed May 15, 2024
1 parent 102adec commit ff12a6b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions agents-api/agents_api/models/entry/proc_mem_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def proc_mem_context_query(
# Collect docs
# Search for agent docs
?[role, name, content, token_count, created_at, index, agent_doc_id] :=
?[role, name, content, token_count, created_at, index, agent_doc_id, user_doc_id] :=
*_input{{agent_id, doc_query}},
*agent_docs {{
agent_id,
Expand All @@ -198,10 +198,11 @@ def proc_mem_context_query(
content = concat(title, ':\n...', snippet),
num_chars = length(content),
token_count = to_int(num_chars / 3.5),
index = 5 + (snippet_idx * 0.01)
index = 5 + (snippet_idx * 0.01),
user_doc_id = null,
# Search for user docs
?[role, name, content, token_count, created_at, index, user_doc_id] :=
?[role, name, content, token_count, created_at, index, user_doc_id, agent_doc_id] :=
*_input{{user_id, doc_query}},
*user_docs {{
user_id,
Expand All @@ -224,7 +225,8 @@ def proc_mem_context_query(
content = concat(title, ':\n...', snippet),
num_chars = length(content),
token_count = to_int(num_chars / 3.5),
index = 5 + (snippet_idx * 0.01)
index = 5 + (snippet_idx * 0.01),
agent_doc_id = null,
# Save in temp table
:create _docs {{
Expand Down

0 comments on commit ff12a6b

Please sign in to comment.