Skip to content
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

Add proxy tool calls option to chat models #1398

Closed

Commits on Sep 23, 2024

  1. Add proxy tool calls option to chat models

     This commit introduces a new proxyToolCalls option for various chat
     models in the Spring AI project. When enabled, it allows the client to
     handle function calls externally instead of being processed internally
     by Spring AI.
    
     The change affects multiple chat model implementations, including:
      AnthropicChatModel
      AzureOpenAiChatModel
      MiniMaxChatModel
      MistralAiChatModel
      MoonshotChatModel
      OllamaChatModel
      OpenAiChatModel
      VertexAiGeminiChatModel
      ZhiPuAiChatModel
    
     The proxyToolCalls option is added to the respective chat options
     classes and integrated into the AbstractToolCallSupport class for
     consistent handling across different implementations.
    
     The proxyToolCalls option can be set either programmatically via
     the <ModelName>ChatOptions.builder().withProxyToolCalls() method
     or the spring.ai.<model-name>.chat.options.proxy-tool-calls
     application property.
    
     Documentation for the new option is also updated in the relevant
     Antora pages.
    
     Resolves spring-projects#1367
    tzolov committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    79b44e4 View commit details
    Browse the repository at this point in the history
  2. Remove OpenAiAdapter

    tzolov committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    f953aaf View commit details
    Browse the repository at this point in the history
  3. Improve the client side ToolCallHelper

     Add ITs for proxy tool calls
    tzolov committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    f28eaa8 View commit details
    Browse the repository at this point in the history