Open jayabdulraman opened 1 month ago
Same issue here. To be able to use the starters feature we need to be able to access the users language. Otherwise I display english starters to a person using the application in e.g. spanish.
did you find a solution ? facing the same problem....
Same issue here cl.user_session doesn't work in set_starters.
Passing it as an argument from outside doesn't work either:
set_starters(cl.user_session.get("character_id"))
@cl.set_starters()
def set_starters(character_id:int)
Describe the bug I am getting chainlit.context.ChainlitContextException: Chainlit context not found when trying to get languages stored in the user_session in set_starters function.
To Reproduce Steps to reproduce the behavior:
Expected behavior My goal is to get users' browser language, do a conditional check and return conversational starters in their language. cl.user_session.get("languages") works in the other decorators like on_message and on_chat_start. I want it to work on set_starters as well.
Screenshots