chainlit
chainlit copied to clipboard
Avatar image is broken when reading threads from history
Describe the bug
The PR https://github.com/Chainlit/chainlit/pull/1326 introduces a bug when it expects the get_avatar
to match string (https://github.com/Chainlit/chainlit/pull/1326/files#diff-9a73e67e163edc3fae6839bf2bcc8c6ab650624eff6668502388a7a86b7ece78R964) .
The Frontend app can make requests to the avatar that do not match the Regex (https://github.com/Chainlit/chainlit/blob/main/frontend/src/components/molecules/messages/components/Avatar.tsx#L31) this creates a bug for existing applications where the config.ui.name
contains space (e.g. My Assistant
).
To Reproduce
Set your config.ui.name to My Assistant
- Create a thread
- Publish messages
- Create a new thread
- Try to resume the previous thread
- See the 400 error and the avatar not showing
Expected behavior Avatar should be loaded for threads in history.