1. Resolve duplicate metadata keys when creating ChatResponseMetadata from OllamaApi.ChatResponse.

eval-duration and eval-count were duplicated. so they have been updated to prompt-eval-duration and prompt-eval-count to avoid overwrite.

AS-IS Spring-ai Fix duplicate keys in ChatResponseMetadata for OllamaApi.ChatResponse

TO-BE Spring-ai Fix duplicate keys in ChatResponseMetadata for OllamaApi.ChatResponse

  1. Fix assertion for ModelManagementOptions .

AS-IS Incorrect object was being asserted. observationRegistry So, NPE occurs at line 105 where OllamaModelManager is being created. Spring-ai Fix duplicate keys in ChatResponseMetadata for OllamaApi.ChatResponse

TO-BE Replace observationRegistry with ModelManagementOptions Proper exception handling and error messages for modelManagementOptions. Spring-ai Fix duplicate keys in ChatResponseMetadata for OllamaApi.ChatResponse

Comment From: jitokim

@ilayaperumalg
Hi, I have revised the content of the PR comment in detail and added test code to verify the changes. Thanks.

Comment From: ilayaperumalg

@jitokim Thanks for the PR! The changes look good to me.