microsoft / TaskWeaver

A code-first agent framework for seamlessly planning and executing data analytics tasks.
https://microsoft.github.io/TaskWeaver/
MIT License
5.01k stars 637 forks source link

I get an error when I try to run the UI #280

Open uebhh opened 3 months ago

uebhh commented 3 months ago

Environment Information (please complete the following information):

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

mufenzhimi commented 3 months ago

same error here

ashiq-techie commented 3 months ago

@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.

liqul commented 3 months ago

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

uebhh commented 3 months ago

@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 commented 3 months ago

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.

shivan commented 3 months ago

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