As mentioned in #158 I was trying to add the current context usage in to my chat window header but it wasn't quite working correctly because the header is only updated in certain cases.
I had another use case today where I wanted to display the name of the model being used in the chat header, and I think I'll run into a similar issue.
Secondly, this may deserve it's own issue: but I also don't know if there's an API exposed for getting the current model. I see the model is set using self.agent:set_config_option which directly calls session/set_config_option but the actual value does not seem to be retained anywhere else, but it might be nice. Alternatively, I could probably use #158 to grab the model from config_option_update and then store it myself, so that might be a good alternative to, but I still need a good way to update the header after storing the value of the model somewhere.
As mentioned in #158 I was trying to add the current context usage in to my chat window header but it wasn't quite working correctly because the header is only updated in certain cases.
I had another use case today where I wanted to display the name of the model being used in the chat header, and I think I'll run into a similar issue.
Secondly, this may deserve it's own issue: but I also don't know if there's an API exposed for getting the current model. I see the model is set using
self.agent:set_config_optionwhich directly callssession/set_config_optionbut the actual value does not seem to be retained anywhere else, but it might be nice. Alternatively, I could probably use #158 to grab the model fromconfig_option_updateand then store it myself, so that might be a good alternative to, but I still need a good way to update the header after storing the value of the model somewhere.