Package org.mockserver.model
Class Completion
- java.lang.Object
-
- org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
-
- org.mockserver.model.ObjectWithJsonToString
-
- org.mockserver.model.Completion
-
public class Completion extends ObjectWithJsonToString
-
-
Constructor Summary
Constructors Constructor Description Completion()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Completioncompletion()booleanequals(Object o)StringgetStopReason()BooleangetStreaming()StreamingPhysicsgetStreamingPhysics()StringgetText()List<ToolUse>getToolCalls()UsagegetUsage()inthashCode()Completionstreaming()CompletionwithStopReason(String stopReason)CompletionwithStreaming(Boolean streaming)CompletionwithStreamingPhysics(Object... parts)Compose streaming physics from independent values.CompletionwithStreamingPhysics(StreamingPhysics streamingPhysics)CompletionwithText(String text)CompletionwithToolCall(ToolUse toolCall)CompletionwithToolCalls(List<ToolUse> toolCalls)CompletionwithToolCalls(ToolUse... toolCalls)CompletionwithUsage(Usage usage)-
Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toString
-
Methods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
fieldsExcludedFromEqualsAndHashCode
-
-
-
-
Method Detail
-
completion
public static Completion completion()
-
withText
public Completion withText(String text)
-
getText
public String getText()
-
withToolCalls
public Completion withToolCalls(List<ToolUse> toolCalls)
-
withToolCalls
public Completion withToolCalls(ToolUse... toolCalls)
-
withToolCall
public Completion withToolCall(ToolUse toolCall)
-
withStopReason
public Completion withStopReason(String stopReason)
-
getStopReason
public String getStopReason()
-
withUsage
public Completion withUsage(Usage usage)
-
getUsage
public Usage getUsage()
-
withStreaming
public Completion withStreaming(Boolean streaming)
-
streaming
public Completion streaming()
-
getStreaming
public Boolean getStreaming()
-
withStreamingPhysics
public Completion withStreamingPhysics(StreamingPhysics streamingPhysics)
-
withStreamingPhysics
public Completion withStreamingPhysics(Object... parts)
Compose streaming physics from independent values. Accepts any combination ofDelay(interpreted as time-to-first-token) andStreamingPhysicsfragments (each typically carrying a single field — e.g.tokensPerSecond(50)orjitter(0.2)). Non-null fields from the fragments are merged left-to-right onto a singleStreamingPhysicsinstance which is then assigned to this completion. Calling implicitly enables streaming.
-
getStreamingPhysics
public StreamingPhysics getStreamingPhysics()
-
equals
public boolean equals(Object o)
- Overrides:
equalsin classObjectWithReflectiveEqualsHashCodeToString
-
hashCode
public int hashCode()
- Overrides:
hashCodein classObjectWithReflectiveEqualsHashCodeToString
-
-