TaskWeaver icon indicating copy to clipboard operation
TaskWeaver copied to clipboard

I get an error when I try to run the UI

Open uebhh opened this issue 10 months ago • 6 comments

Environment Information (please complete the following information):

  • OS: [Windows]
  • Python Version [3.11]
  • LLM that you're using: [glm-4]
  • Other Configurations except the LLM api/key related: [e.g., code_verification: true]

When I try to run the UI I get this error: (taskweaver) D:\TaskWeaver\playground\UI>chainlit run app.py Traceback (most recent call last): File "", line 198, in run_module_as_main File "", line 88, in run_code File "D:\software\anaconda\envs\taskweaver\Scripts\chainlit.exe_main.py", line 4, in File "D:\software\anaconda\envs\taskweaver\Lib\site-packages\chainlit_init.py", line 24, in from chainlit.action import Action File "D:\software\anaconda\envs\taskweaver\Lib\site-packages\chainlit\action.py", line 5, in from chainlit.telemetry import trace_event File "D:\software\anaconda\envs\taskweaver\Lib\site-packages\chainlit\telemetry.py", line 12, in from chainlit.config import config File "D:\software\anaconda\envs\taskweaver\Lib\site-packages\chainlit\config.py", line 469, in config = load_config() ^^^^^^^^^^^^^ File "D:\software\anaconda\envs\taskweaver\Lib\site-packages\chainlit\config.py", line 438, in load_config settings = load_settings() ^^^^^^^^^^^^^^^ File "D:\software\anaconda\envs\taskweaver\Lib\site-packages\chainlit\config.py", line 408, in load_settings features_settings = FeaturesSettings(**features_settings) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\software\anaconda\envs\taskweaver\Lib\site-packages\pydantic_internal_dataclasses.py", line 135, in init s.pydantic_validator.validate_python(ArgsKwargs(args, kwargs), self_instance=s) pydantic_core._pydantic_core.ValidationError: 1 validation error for FeaturesSettings multi_modal Input should be a dictionary or an instance of MultiModalFeature [type=dataclass_type, input_value=True, input_type=bool] For further information visit https://errors.pydantic.dev/2.6/v/dataclass_type

uebhh avatar Apr 02 '24 14:04 uebhh

same error here

mufenzhimi avatar Apr 03 '24 03:04 mufenzhimi

@uebhh Looks like the guys merged a bad PR request at Chainlit. In your .chainlit/config.toml comment out the following lines in [features] and you are good to go for now. This is me assuming your app does not require multi modal or speech to text capabilities in the Chainlit UI.

multi_modal = false
[features.speech_to_text]
    enabled = false

I have mine like

# Authorize users to upload files with messages
# multi_modal = false

# Allows user to use speech to text
#[features.speech_to_text]
#    enabled = false
    # See all languages here https://github.com/JamesBrill/react-speech-recognition/blob/HEAD/docs/API.md#language-string
    # language = "en-US"

Hope it helps for now.

ashiq-techie avatar Apr 03 '24 04:04 ashiq-techie

It seems chainlit has a version upgrade and the configurations have changed and it is incompatible with the previous. The fix would be change the line

multi_modal = true

to

multi_model.enabled = true

Refer to https://docs.chainlit.io/backend/config/features

liqul avatar Apr 03 '24 05:04 liqul

@uebhh Looks like the guys merged a bad PR request at Chainlit. In your .chainlit/config.toml comment out the following lines in [features] and you are good to go for now. This is me assuming your app does not require multi modal or speech to text capabilities in the Chainlit UI.

multi_modal = false
[features.speech_to_text]
    enabled = false

I have mine like

# Authorize users to upload files with messages
# multi_modal = false

# Allows user to use speech to text
#[features.speech_to_text]
#    enabled = false
    # See all languages here https://github.com/JamesBrill/react-speech-recognition/blob/HEAD/docs/API.md#language-string
    # language = "en-US"

Hope it helps for now.

Thank you, after the modification, it can be started.

uebhh avatar Apr 03 '24 06:04 uebhh

It seems chainlit has a version upgrade and the configurations have changed and it is incompatible with the previous. The fix would be change the line

multi_modal = true

to

multi_model.enabled = true

Refer to https://docs.chainlit.io/backend/config/features

Thank you, it worked.

uebhh avatar Apr 03 '24 06:04 uebhh

There's also a solution described in the migration guide: https://docs.chainlit.io/guides/migration/1.0.500

shivan avatar Apr 05 '24 08:04 shivan