Record Class ParseResult
java.lang.Object
java.lang.Record
smile.llm.tool.ParseResult
- Record Components:
content- text before the first tool call; may benull.toolCalls- parsed tool calls (possibly empty).reason- finish reason after parsing.
public record ParseResult(String content, List<ToolCall> toolCalls, FinishReason reason)
extends Record
Result of parsing assistant text for tool calls.
-
Constructor Summary
ConstructorsConstructorDescriptionParseResult(String content, List<ToolCall> toolCalls, FinishReason reason) Compact canonical constructor. -
Method Summary
Modifier and TypeMethodDescriptioncontent()Returns the value of thecontentrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns whether one or more tool calls were parsed.reason()Returns the value of thereasonrecord component.Returns the value of thetoolCallsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ParseResult
Compact canonical constructor.
-
-
Method Details
-
hasToolCalls
public boolean hasToolCalls()Returns whether one or more tool calls were parsed.- Returns:
truewhen one or more tool calls were parsed.
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
content
-
toolCalls
-
reason
-