Class AnthropicTaskSettings.Builder
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<AnthropicTaskSettings.Builder>
co.elastic.clients.elasticsearch.inference.AnthropicTaskSettings.Builder
- All Implemented Interfaces:
- WithJson<AnthropicTaskSettings.Builder>,- ObjectBuilder<AnthropicTaskSettings>
- Enclosing class:
- AnthropicTaskSettings
public static class AnthropicTaskSettings.Builder
extends WithJsonObjectBuilderBase<AnthropicTaskSettings.Builder>
implements ObjectBuilder<AnthropicTaskSettings>
Builder for 
AnthropicTaskSettings.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds aAnthropicTaskSettings.maxTokens(int value) Required - For acompletiontask, it is the maximum number of tokens to generate before stopping.protected AnthropicTaskSettings.Builderself()temperature(Float value) For acompletiontask, it is the amount of randomness injected into the response.For acompletiontask, it specifies to only sample from the top K options for each subsequent token.For acompletiontask, it specifies to use Anthropic's nucleus sampling.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBasewithJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
maxTokensRequired - For acompletiontask, it is the maximum number of tokens to generate before stopping.API name: max_tokens
- 
temperatureFor 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
- 
topKFor 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
- 
topPFor 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
- 
self- Specified by:
- selfin class- WithJsonObjectBuilderBase<AnthropicTaskSettings.Builder>
 
- 
buildBuilds aAnthropicTaskSettings.- Specified by:
- buildin interface- ObjectBuilder<AnthropicTaskSettings>
- Throws:
- NullPointerException- if some of the required fields are null.
 
 
-