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 Long
The 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 String
model()
The ID of the model to use.static RequestChatCompletion
void
serialize
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected void
serializeInternal
(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static void
stop()
A sequence of strings to control when the model should stop generating additional tokens.final Float
The sampling temperature to use.final CompletionToolType
Controls which tool is called by the model.final List<CompletionTool>
tools()
A list of tools that the model can call.final Float
topP()
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:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupRequestChatCompletionDeserializer
protected static void setupRequestChatCompletionDeserializer(ObjectDeserializer<RequestChatCompletion.Builder> op)
-