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 intRequired - For acompletiontask, it is the maximum number of tokens to generate before stopping.static AnthropicTaskSettingsvoidserialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) Serialize this object to JSON.protected voidserializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper) protected static voidfinal FloatFor acompletiontask, it is the amount of randomness injected into the response.final IntegertopK()For acompletiontask, it specifies to only sample from the top K options for each subsequent token.final FloattopP()For acompletiontask, 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 acompletiontask, it is the maximum number of tokens to generate before stopping.API name:
max_tokens -
temperature
For acompletiontask, 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 acompletiontask, 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 acompletiontask, 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 altertemperatureortop_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:
serializein interfaceJsonpSerializable
-
serializeInternal
-
toString
-
setupAnthropicTaskSettingsDeserializer
protected static void setupAnthropicTaskSettingsDeserializer(ObjectDeserializer<AnthropicTaskSettings.Builder> op)
-