Skip to content

Conversation

@jitokim
Copy link
Contributor

@jitokim jitokim commented Nov 7, 2024

  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
image

TO-BE
image

  1. Fix assertion for ModelManagementOptions .

AS-IS
Incorrect object was being asserted. observationRegistry
So, NPE occurs at line 105 where OllamaModelManager is being created.
image

TO-BE
Replace observationRegistry with ModelManagementOptions
Proper exception handling and error messages for modelManagementOptions.
image

… metadata

Fix assertion in contructor of OllamaChatModel

Signed-off-by: jitokim <[email protected]>
@jitokim jitokim force-pushed the fix-metadata-key-duplication branch from 5869bee to 7a72a72 Compare November 7, 2024 18:28
@jitokim
Copy link
Contributor Author

jitokim commented Nov 14, 2024

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

@tzolov tzolov added the ollama label Nov 19, 2024
@tzolov tzolov added this to the 1.0.0-M4 milestone Nov 19, 2024
@ilayaperumalg
Copy link
Member

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

@ilayaperumalg ilayaperumalg merged commit 1298a28 into spring-projects:main Nov 19, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants