RAG Agent example doesn't work #709
Unanswered
zzhi-github
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This is the example codes:
from praisonaiagents import Agent
config = {
"vector_store": {
"provider": "chroma",
"config": {
"collection_name": "praison",
"path": ".praison",
}
}
}
agent = Agent(
name="Knowledge Agent",
instructions="You answer questions based on the provided knowledge.",
knowledge=["large.pdf"],
knowledge_config=config,
user_id="user1"
)
agent.start("What is KAG in one line?")
It doesn't work as expectation. There are many errors when running it.
Error 1:
ERROR [21:17:07] knowledge.py:214 ERROR Error storing content: 404 page not found knowledge.py:214
ERROR [21:17:07] knowledge.py:214 ERROR Error storing content: 404 page not found knowledge.py:214
Error 2:
PraisonAI/.venv/lib/python3.12/site-packages/praisonaiagents/knowledge/knowledge.py", line 243, in search
return self.memory.search(query, user_id=user_id, agent_id=agent_id, run_id=run_id, rerank=rerank, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Memory.search() got an unexpected keyword argument 'rerank'
INFO [21:17:07] _common.py:105 INFO Backing off send_request(...) for 0.3s (requests.exceptions.ConnectionError: _common.py:105
HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by
NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff3c9db1d0>: Failed to resolve 'us.i.posthog.com' ([Errno -2]
Name or service not known)")))
[21:17:08] INFO [21:17:08] _common.py:105 INFO Backing off send_request(...) for 1.7s (requests.exceptions.ConnectionError: _common.py:105
HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by
NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff3c9dbd70>: Failed to resolve 'us.i.posthog.com' ([Errno -2]
Name or service not known)")))
[21:17:09] INFO [21:17:09] _common.py:105 INFO Backing off send_request(...) for 0.3s (requests.exceptions.ConnectionError: _common.py:105
HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by
NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff3c9c07a0>: Failed to resolve 'us.i.posthog.com' ([Errno -2]
Name or service not known)")))
[21:17:10] ERROR [21:17:10] _common.py:120 ERROR Giving up send_request(...) after 4 tries (requests.exceptions.ConnectionError: _common.py:120
HTTPSConnectionPool(host='us.i.posthog.com', port=443): Max retries exceeded with url: /batch/ (Caused by
NameResolutionError("<urllib3.connection.HTTPSConnection object at 0xffff3c9c1010>: Failed to resolve 'us.i.posthog.com' ([Errno -2]
Name or service not known)")))
ls -l .praison/
total 164
drwxr-xr-x 1 98 Jun 28 17:43 868d83d6-b777-40ef-aad9-b20b8a782976
-rw-r--r-- 1 167936 Jun 28 21:17 chroma.sqlite3
Beta Was this translation helpful? Give feedback.
All reactions