Class SamplingRequestImpl
java.lang.Object
io.quarkiverse.mcp.server.runtime.SamplingRequestImpl
- All Implemented Interfaces:
SamplingRequest
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.quarkiverse.mcp.server.SamplingRequest
SamplingRequest.Builder, SamplingRequest.IncludeContext -
Method Summary
Modifier and TypeMethodDescriptionlongmessages()metadata()io.smallrye.mutiny.Uni<SamplingResponse>send()Send a message to the client.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.quarkiverse.mcp.server.SamplingRequest
sendAndAwait
-
Method Details
-
maxTokens
public long maxTokens()- Specified by:
maxTokensin interfaceSamplingRequest- Returns:
- the maximum number of tokens to sample
-
messages
- Specified by:
messagesin interfaceSamplingRequest- Returns:
- the sampling messages (not
null)
-
stopSequences
- Specified by:
stopSequencesin interfaceSamplingRequest- Returns:
- the stop sequences
-
systemPrompt
- Specified by:
systemPromptin interfaceSamplingRequest- Returns:
- the system prompt the server wants to use for sampling
-
temperature
- Specified by:
temperaturein interfaceSamplingRequest- Returns:
- the temperature
-
includeContext
- Specified by:
includeContextin interfaceSamplingRequest- Returns:
- the request to include the context
-
modelPreferences
- Specified by:
modelPreferencesin interfaceSamplingRequest- Returns:
- the model preferences
-
metadata
- Specified by:
metadatain interfaceSamplingRequest- Returns:
- the optional metadata
-
send
Description copied from interface:SamplingRequestSend a message to the client.If the client does not respond before the timeout expires then the returned
Unifails withTimeoutException. The default timeout is configured with thequarkus.mcp.server.sampling.default-timeoutconfig property.- Specified by:
sendin interfaceSamplingRequest- Returns:
- a new
Unithat completes with aSamplingResponse
-