Package org.mockserver.model
Class HttpLlmResponse
java.lang.Object
-
Nested Class Summary
Nested classes/interfaces inherited from class org.mockserver.model.Action
Action.Direction, Action.Type -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetChaos()Returns the conversation matcher for evaluation.getModel()getType()inthashCode()static HttpLlmResponsewithChaos(LlmChaosProfile chaos) Optional fault/chaos profile applied when returning this response — probabilistic errors, mid-stream truncation, malformed SSE.withCompletion(Completion completion) withContentFilter(LlmContentFilter contentFilter) Optional Azure OpenAI content-filter severities.withConversationMatcher(LlmConversationMatcher conversationMatcher) withConversationPredicates(ConversationPredicates conversationPredicates) withEmbedding(EmbeddingResponse embedding) withModeration(ModerationResponse moderation) Configure this response as an OpenAI Moderations endpoint response (POST /v1/moderations) — a flagged/not-flagged verdict with per-category scores.withProvider(Provider provider) withRerank(RerankResponse rerank) Methods inherited from class org.mockserver.model.Action
getDelay, getExpectationId, isPrimary, setExpectationId, withDelay, withDelay, withPrimaryMethods inherited from class org.mockserver.model.ObjectWithJsonToString
toStringMethods inherited from class org.mockserver.model.ObjectWithReflectiveEqualsHashCodeToString
fieldsExcludedFromEqualsAndHashCode
-
Constructor Details
-
HttpLlmResponse
public HttpLlmResponse()
-
-
Method Details
-
llmResponse
-
withProvider
-
getProvider
-
withModel
-
getModel
-
withCompletion
-
getCompletion
-
withEmbedding
-
getEmbedding
-
withRerank
-
getRerank
-
withModeration
Configure this response as an OpenAI Moderations endpoint response (POST /v1/moderations) — a flagged/not-flagged verdict with per-category scores. When set, the response returns the moderations wire shape instead of a completion. -
getModeration
-
withContentFilter
Optional Azure OpenAI content-filter severities. When set on an Azure response, thecontent_filter_results(per choice) andprompt_filter_results(top-level) annotations are added so agents can detect filtering. Also shapes the severities of a chaos content-filter block. -
getContentFilter
-
withConversationPredicates
-
getConversationPredicates
-
withChaos
Optional fault/chaos profile applied when returning this response — probabilistic errors, mid-stream truncation, malformed SSE. -
getChaos
-
withConversationMatcher
-
getConversationMatcher
Returns the conversation matcher for evaluation. If not explicitly set, lazily reconstructs it fromconversationPredicates(which survives JSON round-tripping). Returns null if neither is set. -
getType
- Specified by:
getTypein classAction<HttpLlmResponse>
-
equals
- Overrides:
equalsin classAction<HttpLlmResponse>
-
hashCode
public int hashCode()- Overrides:
hashCodein classAction<HttpLlmResponse>
-