Closed JeffandJack closed 7 months ago
@JeffandJack I don't have a zhipuai account with credit so I cannot run it. However, it looks more like a dependency issue as the error message suggests. Could you please check if your zhipuai package is the latest.
close inactive issues
Describe the bug my taskweaver_config.json config is like this: { "llm.api_type": "zhipuai", "llm.model": "glm-3-turbo", "llm.embedding_model": "embedding-2", "llm.embedding_api_type": "zhipuai", "llm.api_key": "my api key", "code_interpreter.allowed_modules": ["pandas", "matplotlib", "numpy", "sklearn", "scipy", "seaborn", "datetime", "typing"] } I also haved install zhipuai package before,but when I execute command "chainlit run app.py" to start with ui mode,I got some error information like this: If UI is not started, please go to the folder playground/UI and run
sys.exit(cli())
^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(args, kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/chainlit/cli/init.py", line 153, in chainlit_run
run_chainlit(target)
File "/usr/local/anaconda3/lib/python3.11/site-packages/chainlit/cli/init.py", line 55, in run_chainlit
load_module(config.run.module_name)
File "/usr/local/anaconda3/lib/python3.11/site-packages/chainlit/config.py", line 342, in load_module
spec.loader.exec_module(module)
File "", line 940, in exec_module
File "", line 241, in _call_with_frames_removed
File "/root/TaskWeaver/playground/UI/app.py", line 33, in
app = TaskWeaverApp(app_dir=project_path, use_local_uri=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/TaskWeaver/playground/UI/../../taskweaver/app/app.py", line 43, in init
self._init_app_modules()
File "/root/TaskWeaver/playground/UI/../../taskweaver/app/app.py", line 91, in _init_app_modules
self.app_injector.get(LLMApi)
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 91, in wrapper
return function(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 975, in get
result = provider_instance.get(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 264, in get
return injector.create_object(self._cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 998, in create_object
self.call_withinjection(init, self=instance, kwargs=additional_kwargs)
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 1040, in call_with_injection
return callable(full_args, dependencies)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/TaskWeaver/playground/UI/../../taskweaver/llm/init.py", line 37, in init
self._set_completion_service(ZhipuAIService)
File "/root/TaskWeaver/playground/UI/../../taskweaver/llm/init.py", line 73, in _set_completion_service
self.completion_service: CompletionService = self.injector.get(svc)
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 91, in wrapper
return function(*args, *kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 975, in get
result = provider_instance.get(self)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 264, in get
return injector.create_object(self._cls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 998, in create_object
self.call_withinjection(init, self=instance, kwargs=additional_kwargs)
File "/usr/local/anaconda3/lib/python3.11/site-packages/injector/init.py", line 1040, in call_with_injection
return callable(full_args, **dependencies)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/root/TaskWeaver/playground/UI/../../taskweaver/llm/zhipuai.py", line 73, in init
self.client = ZhipuAIService.zhipuai.ZhipuAI(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'zhipuai' has no attribute 'ZhipuAI'
chainlit run app.py
to start the UI Traceback (most recent call last): File "/usr/local/anaconda3/bin/chainlit", line 8, inEnvironment Information (please complete the following information):