[Feature]: Add session persistence for Azure OpenAI
#443 added session persistence for Gemini, but other providers were left unimplemented.
We should add similar implementation of Initialize() to load chat history for Azure OpenAI. This can happen in gollm/azopenai.go and will likely follow a similar flow to Gemini, where we convert api messages to the provider-specific messages and add them to the history.
Adding tests is also very welcomed. Basic flows like saving and loading sessions, creating a new session, deleting a session, and listing sessions should be covered. Edge cases like invalid session ID and corrupted save file should also be covered.
@noahlwest I have picked this up and started testing on Azure Open AI today, will add to this my comments on progress by EoD tomorrrow.
@noahlwest I think the test cases for individual LLM Provider implementations should contain testing for the
- Initialize() function
- messageToContent() function
- partsToGemini() or partsToProvider()
- any other methods which were needed to bring it to the flow of Initialize() method
The test cases to saving and loading a session, creating a session, deleting a session, listing sessions, for corrupt file for loading saved session, etc. should be a part of pkg/sessions/session_test.go. I have already implemented that and committed in #497, please have a look.
Do let me know your thoughts around similar issue around other Provider implementations in kubect-ai/gollm
@noahlwest #497 implements this, pls review that. Also, let me know if we need test cases that I mentioned above here.