Class OllamaApiHelper
java.lang.Object
org.springframework.ai.ollama.api.OllamaApiHelper
- Since:
- 1.0.0
- Author:
- Christian Tzolov, Sun Yuhan
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisStreamingDone(OllamaApi.ChatResponse ollamaChatResponse) static booleanisStreamingToolCall(OllamaApi.ChatResponse ollamaChatResponse) static OllamaApi.ChatResponsemerge(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)
-