You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using ChromaDB as Vector Database of Knowledge Base is always giving response - No Documents Found.
After calling the search function on Knowledge Base, It logs "Error searching for documents: list indices must be integers or slices, not str"
Steps to Reproduce
Create a Knowledge Base like this:
from agno.agent import AgentKnowledge
from agno.embedder.sentence_transformer import SentenceTransformerEmbedder
from agno.vectordb.chroma import ChromaDb
knowledge_base = AgentKnowledge(
vector_db=ChromaDb(
collection="collection_name",
persistent_client=True,
path="path/to/db",
embedder=SentenceTransformerEmbedder(
id="all-mpnet-base-v2" # I was using this embedding model.
)
),
)
docs = knowledge_base.search(query="Some Query",num_documents=5)
for doc in docs:
print(doc,"\n\n")
Expected Behavior
It should have Listed down 5 relevant documents from the Persistent ChromaDB.
Actual Behavior
It logged the Error saying "Error searching for documents: list indices must be integers or slices, not str" and returned empty list of Documents.
Screenshots or Logs (if applicable)
Environment
OS: Ubuntu Linux
Agno Version: 1.0.4
Additional Environment Details: Python 3.12.8
Possible Solutions (optional)
At this code in the file agno/vectordb/chroma Line no. 205 - 214
The metadata will receive the value [[]] (list of list), But indices like "distances", "uris", "data" is directly accessed from metadata which will have value as (list of dict).
This will throw the error saying list indices must be int, not str.
The text was updated successfully, but these errors were encountered:
Description
Using ChromaDB as Vector Database of Knowledge Base is always giving response - No Documents Found.
After calling the search function on Knowledge Base, It logs "Error searching for documents: list indices must be integers or slices, not str"
Steps to Reproduce
Create a Knowledge Base like this:
Expected Behavior
It should have Listed down 5 relevant documents from the Persistent ChromaDB.
Actual Behavior
It logged the Error saying "Error searching for documents: list indices must be integers or slices, not str" and returned empty list of Documents.
Screenshots or Logs (if applicable)
Environment
Possible Solutions (optional)
At this code in the file agno/vectordb/chroma Line no. 205 - 214
The metadata will receive the value [[]] (list of list), But indices like "distances", "uris", "data" is directly accessed from metadata which will have value as (list of dict).
This will throw the error saying list indices must be int, not str.
The text was updated successfully, but these errors were encountered: