Class OllamaApiHelper

java.lang.Object
org.springframework.ai.ollama.api.OllamaApiHelper

public final class OllamaApiHelper extends Object
Since:
1.0.0
Author:
Christian Tzolov
  • Method Details

    • isStreamingToolCall

      public static boolean isStreamingToolCall(OllamaApi.ChatResponse ollamaChatResponse)
      Parameters:
      ollamaChatResponse - the Ollama chat response chunk to check
      Returns:
      true if the chunk is a streaming tool call.
    • isStreamingDone

      public static boolean isStreamingDone(OllamaApi.ChatResponse ollamaChatResponse)
      Parameters:
      ollamaChatResponse - the Ollama chat response chunk to check
      Returns:
      true if the chunk is final
    • merge

      public static OllamaApi.ChatResponse merge(OllamaApi.ChatResponse previous, OllamaApi.ChatResponse current)