Class AnthropicTaskSettings
java.lang.Object
co.elastic.clients.elasticsearch.inference.AnthropicTaskSettings
- All Implemented Interfaces:
JsonpSerializable
- See Also:
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JsonpDeserializer<AnthropicTaskSettings>
Json deserializer forAnthropicTaskSettings
-
Method Summary
Modifier and TypeMethodDescriptionfinal int
Required - For acompletion
task, it is the maximum number of tokens to generate before stopping.static AnthropicTaskSettings
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
final Float
For acompletion
task, it is the amount of randomness injected into the response.final Integer
topK()
For acompletion
task, it specifies to only sample from the top K options for each subsequent token.final Float
topP()
For acompletion
task, it specifies to use Anthropic's nucleus sampling.toString()
-
Field Details
-
_DESERIALIZER
Json deserializer forAnthropicTaskSettings
-
-
Method Details
-
of
public static AnthropicTaskSettings of(Function<AnthropicTaskSettings.Builder, ObjectBuilder<AnthropicTaskSettings>> fn) -
maxTokens
public final int maxTokens()Required - For acompletion
task, it is the maximum number of tokens to generate before stopping.API name:
max_tokens
-
temperature
For acompletion
task, it is the amount of randomness injected into the response. For more details about the supported range, refer to Anthropic documentation.API name:
temperature
-
topK
For acompletion
task, it specifies to only sample from the top K options for each subsequent token. It is recommended for advanced use cases only. You usually only need to usetemperature
.API name:
top_k
-
topP
For acompletion
task, it specifies to use Anthropic's nucleus sampling. In nucleus sampling, Anthropic computes the cumulative distribution over all the options for each subsequent token in decreasing probability order and cuts it off once it reaches the specified probability. You should either altertemperature
ortop_p
, but not both. It is recommended for advanced use cases only. You usually only need to usetemperature
.API name:
top_p
-
serialize
Serialize this object to JSON.- Specified by:
serialize
in interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupAnthropicTaskSettingsDeserializer
protected static void setupAnthropicTaskSettingsDeserializer(ObjectDeserializer<AnthropicTaskSettings.Builder> op)
-