-
Notifications
You must be signed in to change notification settings - Fork 2k
Advancing Tool Support - Part 4 #2148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* Adopted new tool calling logic in OllamaChatModel, while maintaining full API backward compatibility thanks to the LegacyToolCallingManager. * Improved efficiency and robustness of merging options in prompts for Ollama. * Update Ollama Autoconfiguration to use the new ToolCallingManager. * Improved troubleshooting for new tool calling APIs and finalised changes for full backward compatibility. * Updated Ollama Testcontainers dependency to 0.5.7. Relates to spring-projectsgh-2049 Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
|
|
||
| @Test | ||
| public void createRequestWithDefaultOptions() { | ||
| void createRequestWithDefaultOptions() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are the only Ollama tests that I had to change, and just because they are testing implementation details and not the public API. All the other tests I left untouched, supporting the backward compatibility validation.
|
|
||
| @Bean | ||
| @ConditionalOnMissingBean | ||
| ToolCallingManager toolCallingManager(ToolCallbackResolver toolCallbackResolver, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be re-used across all ChatModel instances.
In special cases, like Vertex, it can be overwritten to provide a variant using the non-standard schema config.
| <version>${milvus.version}</version> | ||
| </dependency> | ||
|
|
||
| <!-- This is HORRIBLE! But IntelliJ doesn't want to work without it --> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's something in the Milvus Java SDK causing a compilation error in IntelliJ if Lombok is not added as a dependency. And the error propagates to the spring-ai-spring-boot-auto-configure module, making it impossible to run auto tests from the IDE. I should probably remove this from the PR (I forgot to undo the change before committing), but since it's here I figured it'd be good to bring this up and talk about it, before reverting the change.
|
Thanks @ThomasVitale |
OllamaChatModel, while maintaining full API backward compatibility thanks to theLegacyToolCallingManager.ToolCallingManager.Relates to gh-2049