Try to fix #478 issue, now works for Azure.
Due Microsoft API we need to "clone" the DTO structure. All MS DTO are final class with private constructors.
Comment From: radhakrishna67
@tzolov , this will solve latency issues. Could you please prioritize it?
Comment From: tzolov
Hey @radhakrishna67, Thank you for taking your time for addressing this. I've started reviewing it 2 weeks ago, but hit some IT test failures and something like multiple flux pipeline executions for the same call. Otherwise the approach seems right. I will be able to look at it again, hopefully next week, after we coock out the chat-history feature.
Comment From: imGruuu
@tzolov Hello Dear Sir, I'm blocked by the same question above. Will the next release version fix the ability to stream Azure OpenAi to make function calls? This is important for us as we work based on the resources provided by Azure, thank you very much! Best regards.
Comment From: Grogdunn
keep updated with main
Comment From: tzolov
Hi @Grogdunn , Finally i had some time to review and refactor this PR. You can find the changes here: https://github.com/tzolov/spring-ai/commits/gh-496-pr Basically I fixed the few small issues causing failures for OpenAI, Gemini and Mistral models (Anthropic doesn't support streaming function calling). Also i've replaced the wrapping with java reflection for calling the private constructors and fields. I believe this is less intrusive and easier to maintain.
Let me know if you agree with those changes so i can merge it. Also, please let me know what name to put in the @author javadoc for you?
Comment From: tzolov
@Grogdunn thank you again for the great contribution! I went ahead and merged the PR with the above mentioned changes and using your GH handle as javadoc @author. Feel free to submit follow up PRs if you need to make some adjustments.
Comment From: tzolov
Rebased, squashed and merged at a7eb28ac17debbaaaf227802eb0385f3daea4fd8