Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add indices migration #942

Merged
merged 14 commits into from
Dec 10, 2024
Prev Previous commit
fix: Remove indices as they cause no field error
whiterabbit1983 committed Dec 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 2f88b8c23b389d1a7485bbc3872b9aae243944ca
2 changes: 1 addition & 1 deletion agents-api/agents_api/models/agent/get_agent.py
Original file line number Diff line number Diff line change
@@ -70,7 +70,7 @@ def get_agent(*, developer_id: UUID, agent_id: UUID) -> tuple[list[str], dict]:
default_settings,
instructions,
] := input[id],
*agents:developer_id_metadata_agent_id_idx {
*agents {
developer_id: to_uuid($developer_id),
agent_id: id,
model,
2 changes: 1 addition & 1 deletion agents-api/agents_api/models/agent/list_agents.py
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ def list_agents(
default_settings,
instructions,
] := input[developer_id],
*agents:developer_id_metadata_agent_id_idx {{
*agents {{
developer_id,
agent_id: id,
model,
2 changes: 1 addition & 1 deletion agents-api/agents_api/models/docs/list_docs.py
Original file line number Diff line number Diff line change
@@ -106,7 +106,7 @@ def list_docs(
] :=
owner_type = $owner_type,
owner_id = to_uuid($owner_id),
*docs:owner_id_metadata_doc_id_idx {{
*docs {{
owner_type,
owner_id,
doc_id: id,
4 changes: 2 additions & 2 deletions agents-api/agents_api/models/docs/search_docs_by_embedding.py
Original file line number Diff line number Diff line change
@@ -142,7 +142,7 @@ def search_docs_by_embedding(
input[owner_type, owner_id, query],
# Restrict the search to all documents that match the owner
*docs:owner_id_metadata_doc_id_idx {{
*docs {{
owner_type,
owner_id,
doc_id,
@@ -203,7 +203,7 @@ def search_docs_by_embedding(
input[owner_type, owner_id, query],
# Restrict the search to all documents that match the owner
*docs:owner_id_metadata_doc_id_idx {{
*docs {{
owner_type,
owner_id,
doc_id,
2 changes: 1 addition & 1 deletion agents-api/agents_api/models/docs/search_docs_by_text.py
Original file line number Diff line number Diff line change
@@ -145,7 +145,7 @@ def search_docs_by_text(
metadata,
] :=
candidate[doc_id],
*docs:owner_id_metadata_doc_id_idx {{
*docs {{
owner_type,
owner_id,
doc_id,