Package org.mockserver.model
Class StreamingPhysics
java.lang.Object
org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
org.mockserver.model.ObjectWithJsonToString
org.mockserver.model.StreamingPhysics
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetSeed()inthashCode()static StreamingPhysicswithJitter(Double jitter) withSubwordStreaming(Boolean subwordStreaming) Controls streaming delta granularity.withTimeToFirstToken(Delay timeToFirstToken) withTokensPerSecond(Integer tokensPerSecond) Methods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
fieldsExcludedFromEqualsAndHashCode
-
Constructor Details
-
StreamingPhysics
public StreamingPhysics()
-
-
Method Details
-
streamingPhysics
-
withTimeToFirstToken
-
getTimeToFirstToken
-
withTokensPerSecond
-
getTokensPerSecond
-
withJitter
-
getJitter
-
withSeed
-
getSeed
-
withSubwordStreaming
Controls streaming delta granularity. Subword-sized deltas (a lightweight BPE approximation, seeorg.mockserver.llm.TokenCounter) are now the default: leaving this unset (null) — or setting ittrue— emits finer, more realistic per-token deltas. Set it explicitly tofalseto opt back into the legacy whole-word (whitespace-boundary) splitting. The per-event timing math is unchanged — each delta is still one physics event — so subword mode simply produces more, smaller events, closer to a real provider's per-token stream (and therefore a slightly longer total stream duration for the sametokensPerSecond). -
getSubwordStreaming
-
equals
- Overrides:
equalsin classObjectWithReflectiveEqualsHashCodeToString
-
hashCode
public int hashCode()- Overrides:
hashCodein classObjectWithReflectiveEqualsHashCodeToString
-