Class RequestChatCompletion
java.lang.Object
co.elastic.clients.elasticsearch.inference.RequestChatCompletion
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<RequestChatCompletion>Json deserializer forRequestChatCompletion -
Method Summary
Modifier and TypeMethodDescriptionfinal LongThe upper bound limit for the number of tokens that can be generated for a completion request.messages()Required - A list of objects representing the conversation.final Stringmodel()The ID of the model to use.static RequestChatCompletionvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidstop()A sequence of strings to control when the model should stop generating additional tokens.final FloatThe sampling temperature to use.final CompletionToolTypeControls which tool is called by the model.final List<CompletionTool>tools()A list of tools that the model can call.final FloattopP()Nucleus sampling, an alternative to sampling with temperature.toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forRequestChatCompletion
-
-
Method Details
-
of
public static RequestChatCompletion of(Function<RequestChatCompletion.Builder, ObjectBuilder<RequestChatCompletion>> fn) -
messages
Required - A list of objects representing the conversation.API name:
messages -
model
The ID of the model to use.API name:
model -
maxCompletionTokens
The upper bound limit for the number of tokens that can be generated for a completion request.API name:
max_completion_tokens -
stop
A sequence of strings to control when the model should stop generating additional tokens.API name:
stop -
temperature
The sampling temperature to use.API name:
temperature -
toolChoice
Controls which tool is called by the model.API name:
tool_choice -
tools
A list of tools that the model can call.API name:
tools -
topP
Nucleus sampling, an alternative to sampling with temperature.API name:
top_p -
serialize
Serialize this object to JSON.- Specified by:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupRequestChatCompletionDeserializer
protected static void setupRequestChatCompletionDeserializer(ObjectDeserializer<RequestChatCompletion.Builder> op)
-