Class ChatResponse
java.lang.Object
com.codename1.ai.ChatResponse
The terminal response from a chat call. For streaming requests, the
ChatResponse carries the aggregated final assistant message --
the individual deltas were delivered through StreamingListener
before this object was produced.
finishReason is one of: "stop", "length", "tool_calls",
"content_filter", "error" (normalized across providers).
-
Constructor Summary
ConstructorsConstructorDescriptionChatResponse(ChatMessage assistantMessage, List<ToolCall> toolCalls, String finishReason, Usage usage, String modelUsed) -
Method Summary
-
Constructor Details
-
ChatResponse
-
-
Method Details
-
getAssistantMessage
-
getToolCalls
-
getText
Convenience: the assembled assistant text. Equivalent togetAssistantMessage().getText()when there is one. -
getFinishReason
-
getUsage
-
getModelUsed
-