alipay / agentUniverse

agentUniverse is a LLM multi-agent framework that allows developers to easily build multi-agent applications.
Apache License 2.0
572 stars 66 forks source link

No module named 'langchain_community' #56

Closed ToviHe closed 1 month ago

ToviHe commented 1 month ago

from langchain_community.embeddings.openai import OpenAIEmbeddings ModuleNotFoundError: No module named 'langchain_community'

ToviHe commented 1 month ago

我通过 poetry add langchain_community 解决了这个问题。 但是随后运行test_rag_agent.py出现以下错误

python test_rag_agent.py 
/Users/tovi/miniconda3/envs/env_agentuniverse/lib/python3.10/site-packages/pydantic/_internal/_fields.py:160: UserWarning: Field "model_name" has conflict with protected namespace "model_".

You may be able to resolve this warning by setting `model_config['protected_namespaces'] = ()`.
  warnings.warn(
Warn: Boot file is not located under directory 'bootstrap', but under 'test'
/Users/tovi/miniconda3/envs/env_agentuniverse/lib/python3.10/site-packages/pydantic/_internal/_generate_schema.py:394: UserWarning: <module 'chromadb.api.models.Collection' from '/Users/tovi/miniconda3/envs/env_agentuniverse/lib/python3.10/site-packages/chromadb/api/models/Collection.py'> is not a Python type (it may be an instance of an object), Pydantic will allow any object with no validation since we cannot even enforce that the input is an instance of the given type. To get rid of this error wrap the type with `pydantic.SkipValidation`.
  warn(
E
======================================================================
ERROR: test_rag_agent (__main__.RagAgentTest)
Test demo rag agent.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/tovi/Projects/python/agentUniverse/sample_standard_app/app/test/test_rag_agent.py", line 22, in setUp
    AgentUniverse().start(config_path='../../config/config.toml')
  File "/Users/tovi/miniconda3/envs/env_agentuniverse/lib/python3.10/site-packages/agentuniverse/base/agentuniverse.py", line 91, in start
    self.__scan_and_register(self.__config_container.app_configer)
  File "/Users/tovi/miniconda3/envs/env_agentuniverse/lib/python3.10/site-packages/agentuniverse/base/agentuniverse.py", line 132, in __scan_and_register
    self.__register(component_enum, component_configer_list)
  File "/Users/tovi/miniconda3/envs/env_agentuniverse/lib/python3.10/site-packages/agentuniverse/base/agentuniverse.py", line 173, in __register
    component_clz = ComponentConfigerUtil.get_component_object_clz_by_component_configer(configer_instance)
  File "/Users/tovi/miniconda3/envs/env_agentuniverse/lib/python3.10/site-packages/agentuniverse/base/component/component_configer_util.py", line 80, in get_component_object_clz_by_component_configer
    module = importlib.import_module(component_configer.metadata_module)
  File "/Users/tovi/miniconda3/envs/env_agentuniverse/lib/python3.10/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'agentuniverse.llm.default.wenxin_llm'

----------------------------------------------------------------------
Ran 1 test in 0.880s

FAILED (errors=1)