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
agent = Agent(
user_id=user,
knowledge=knowledge_base,
search_knowledge=True,
#use_tools=True,
show_tool_calls=True,
debug_mode=True,
)
if run_id is None:
run_id = agent.run_id
print(f"Started Run: {run_id}\n")
else:
print(f"Continuing Run: {run_id}\n")
while True:
message = Prompt.ask(f"[bold] :sunglasses: {user} [/bold]")
if message in ("exit", "bye"):
break
agent.print_response(message)
if name == "main":
typer.run(pdf_agent)
Agent Configuration (if applicable)
Expected Behavior
Actual Behavior
Screenshots or Logs (if applicable)
DEBUG **************** METRICS END ******************
DEBUG Getting function search_knowledge_base
DEBUG Running: search_knowledge_base(query=Sour Curry with Mixed Vegetables recipe)
DEBUG Getting 5 relevant documents for query: Sour Curry with Mixed Vegetables recipe
ERROR Error searching for documents: list indices must be integers or slices, not str
DEBUG Time to get references: 1.2389s
DEBUG ---------- OpenAI Response Start ----------
DEBUG ============== user ==============
DEBUG Recipe for Sour Curry with Mixed Vegetables?
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_PiwA32TUkVMgh64F8MWrZFeN",
"function": {
"arguments": "{"query":"Sour Curry with Mixed Vegetables recipe"}",
"name": "search_knowledge_base"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_PiwA32TUkVMgh64F8MWrZFeN
DEBUG No documents found
DEBUG ============== assistant ==============
DEBUG I'm sorry, but I couldn't find a specific recipe for Sour Curry with Mixed Vegetables in the knowledge base. However, I can help
you create a basic version of this dish. Here's a simple recipe you can try:
Environment
-Ubuntu
Possible Solutions (optional)
Suggest any ideas you might have to fix or address the issue.
Additional Context
Add any other context or details about the problem here.
if search_knowledge=True, is removed (traditional RAG) the agent works properly.
The text was updated successfully, but these errors were encountered:
Description
The example at https://docs.agno.com/vectordb/chroma does not work
Steps to Reproduce
import typer
from rich.prompt import Prompt
from typing import Optional
from agno.agent import Agent
from agno.knowledge.pdf_url import PDFUrlKnowledgeBase
from agno.vectordb.chroma import ChromaDb
knowledge_base = PDFUrlKnowledgeBase(
urls=["https://agno-public.s3.amazonaws.com/recipes/ThaiRecipes.pdf"],
vector_db=ChromaDb(collection="recipes"),
)
knowledge_base.load(recreate=False)
def pdf_agent(user: str = "user"):
run_id: Optional[str] = None
if name == "main":
typer.run(pdf_agent)
Agent Configuration (if applicable)
Expected Behavior
Actual Behavior
Screenshots or Logs (if applicable)
DEBUG **************** METRICS END ******************
DEBUG Getting function search_knowledge_base
DEBUG Running: search_knowledge_base(query=Sour Curry with Mixed Vegetables recipe)
DEBUG Getting 5 relevant documents for query: Sour Curry with Mixed Vegetables recipe
ERROR Error searching for documents: list indices must be integers or slices, not str
DEBUG Time to get references: 1.2389s
DEBUG ---------- OpenAI Response Start ----------
DEBUG ============== user ==============
DEBUG Recipe for Sour Curry with Mixed Vegetables?
DEBUG ============== assistant ==============
DEBUG Tool Calls: [
{
"id": "call_PiwA32TUkVMgh64F8MWrZFeN",
"function": {
"arguments": "{"query":"Sour Curry with Mixed Vegetables recipe"}",
"name": "search_knowledge_base"
},
"type": "function"
}
]
DEBUG ============== tool ==============
DEBUG Tool call Id: call_PiwA32TUkVMgh64F8MWrZFeN
DEBUG No documents found
DEBUG ============== assistant ==============
DEBUG I'm sorry, but I couldn't find a specific recipe for Sour Curry with Mixed Vegetables in the knowledge base. However, I can help
you create a basic version of this dish. Here's a simple recipe you can try:
Environment
-Ubuntu
Possible Solutions (optional)
Suggest any ideas you might have to fix or address the issue.
Additional Context
Add any other context or details about the problem here.
if search_knowledge=True, is removed (traditional RAG) the agent works properly.
The text was updated successfully, but these errors were encountered: