Class OllamaApiHelper
java.lang.Object
org.springframework.ai.ollama.api.OllamaApiHelper
- Since:
- 1.0.0
- Author:
- Christian Tzolov
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
isStreamingDone
(OllamaApi.ChatResponse ollamaChatResponse) static boolean
isStreamingToolCall
(OllamaApi.ChatResponse ollamaChatResponse) static OllamaApi.ChatResponse
merge
(OllamaApi.ChatResponse previous, OllamaApi.ChatResponse current)
-
Method Details
-
isStreamingToolCall
- Parameters:
ollamaChatResponse
- the Ollama chat response chunk to check- Returns:
- true if the chunk is a streaming tool call.
-
isStreamingDone
- 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)
-