Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
uebhh opened this issue Apr 2, 2024 · 6 comments
Open

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

uebhh opened this issue Apr 2, 2024 · 6 comments

Comments

@uebhh
Copy link

uebhh commented Apr 2, 2024

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

@mufenzhimi
Copy link

same error here

@ashiq-techie
Copy link

@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
Copy link
Contributor

liqul commented Apr 3, 2024

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
Copy link
Author

uebhh commented Apr 3, 2024

@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
Copy link
Author

uebhh commented Apr 3, 2024

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
Copy link

shivan commented Apr 5, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants