[ ] A thread is now initialized within the constructor of OpenAIAssistant. Previously it was only done when the first message was added. Because of that if you initialized an instance it would not yet have a thread created so making a copy of it and adding new messages would result in different threads for each copy. Now all copies will be on the same thread, which makes passing the thread via session or state easier.
[ ] Other improvements to constructor to be more idiomatic, ie. using Option<> instead of random string at initialization.
[ ] Update to the example which is now both working more stably and better shows how set_context can be used to provide additional data to the model.
The PR includes the following changes:
OpenAIAssistant
. Previously it was only done when the first message was added. Because of that if you initialized an instance it would not yet have a thread created so making a copy of it and adding new messages would result in different threads for each copy. Now all copies will be on the same thread, which makes passing the thread via session or state easier.