Allow changing Chat Profile for an existing thread
Is your feature request related to a problem? Please describe.
Currently, changing Chat Profile forcefully triggers a New Chat creation. It does not seem to be possible to change a Chat Profile for an existing thread. Unless I missed anything?
In applications where Chainlit is used to simulate a simplified ChatGPT/OpenWebUI environment and Chat Profiles are used as Model Selectors, this kinda limits the user capabilities where otherwise in other applications a user is able to change a model within an existing chat thread.
Describe the solution you'd like
Allow changing Chat Profiles on an existing thread (with persistence) without creating a new chat.
@DmitriyAlergant The purpose of ChatProfiles are to define an entire assistant so thinks like system message, available tools and capabilities, etc. It can change a lot and would be a misuse of it's purpose.
If you're simply trying to switch the model and nothing else then you can use commands that users can toggle or chat settings. Try those out and see if that works for you.
Well, baseline user's expectation is to see the model switcher where the Chat Profiles are located. They come with an icon, Name, Description, It has to be prominent and visible - rather then hidden somewhere. This is where it is located in most other AI apps - high and prominent.
Yes it can change the capabilities (e.g. available Settings) so ideally this is where a new lifecycle callback on_chat_profile_change() would be fired so the app developers could deal with how exactly to remap settings etc; Or whether to protest in some combinations (e.g. an existing thread has content that the new chat profile can't handle).
But this is how everything else works... In chatgpt's of the world, and in mature open-source apps alike (e.g. OpenWebUI) this is exactly what happens. Changing a model may change the system message (whether it will actually change for an existing thread is debatable, but an app developer can handle that), available tools, what you can or cannot attach (e.g. vision models vs non-vision models), action buttons, etc - and is available mid-flight.
While it may be a new way to look at Chat Profiles, i do feel this needs to become a valid use-case.
I do agree that such a feature would come with limitations and SOME app developers may not want to allow that, depending on use-case. So it would need to be configurable by config.toml
You should think of ChatProfiles like CustomGPTs since you're referring to ChatGPT.
You can open a PR for your idea, just make sure there are robust tests as many people don't use chat profiles as a model picker and we can't break existing behavior