autogen icon indicating copy to clipboard operation
autogen copied to clipboard

Error occurs when I'm trying the demo "agentchat_RetrieveChat.ipynb".

Open lcneyc opened this issue 9 months ago • 9 comments

  1. Sentence_transformers already exists in my environment, autogen still print “The sentence_transformers python package is not installed. Please install it with pip install sentence_transformers“.
  2. After the above message, the code terminated because of the error below( I've already generated the "reference" folder by running pydoc-markdown) : ragproxyagent.initiate_chat(assistant, problem=code_problem, search_string="spark")
  File "/home/ecadi/.conda/envs/py39/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/home/ecadi/.conda/envs/py39/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/home/ecadi/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/__main__.py", line 39, in <module>
    cli.main()
  File "/home/ecadi/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 430, in main
    run()
  File "/home/ecadi/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/adapter/../../debugpy/launcher/../../debugpy/../debugpy/server/cli.py", line 284, in run_file
    runpy.run_path(target, run_name="__main__")
  File "/home/ecadi/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 321, in run_path
    return _run_module_code(code, init_globals, run_name,
  File "/home/ecadi/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 135, in _run_module_code
    _run_code(code, mod_globals, init_globals,
  File "/home/ecadi/.vscode-server/extensions/ms-python.python-2023.14.0/pythonFiles/lib/python/debugpy/_vendored/pydevd/_pydevd_bundle/pydevd_runpy.py", line 124, in _run_code
    exec(code, run_globals)
  File "/home/ecadi/lc/autogen/agentchat_RetrieveChat.py", line 171, in <module>
    ragproxyagent.initiate_chat(assistant, problem=code_problem, search_string="spark")  # search_string is used as an extra filter for the embeddings search, in this case, we only want to search documents that contain "spark".
  File "/home/ecadi/lc/autogen/venv/lib/python3.9/site-packages/autogen/agentchat/conversable_agent.py", line 531, in initiate_chat
    self.send(self.generate_init_message(**context), recipient, silent=silent)
  File "/home/ecadi/lc/autogen/venv/lib/python3.9/site-packages/autogen/agentchat/contrib/retrieve_user_proxy_agent.py", line 403, in generate_init_message
    self.retrieve_docs(problem, n_results, search_string)
  File "/home/ecadi/lc/autogen/venv/lib/python3.9/site-packages/autogen/agentchat/contrib/retrieve_user_proxy_agent.py", line 379, in retrieve_docs
    results = query_vector_db(
  File "/home/ecadi/lc/autogen/venv/lib/python3.9/site-packages/autogen/retrieve_utils.py", line 385, in query_vector_db
    collection = client.get_collection(collection_name)
  File "/home/ecadi/lc/autogen/venv/lib/python3.9/site-packages/chromadb/api/segment.py", line 199, in get_collection
    raise ValueError(f"Collection {name} does not exist.")
ValueError: Collection autogen-docs does not exist.

lcneyc avatar Oct 22 '23 14:10 lcneyc