Create an Anthropic inference endpoint
- PUT /_inference/{task_type}/{anthropic_inference_id}
Create an inference endpoint to perform an inference task with the anthropic service.
Required authorization
- Cluster privileges manage_inference
Request body
-
chunking_settingsobject -
The chunking configuration object.
- Reference
-
max_chunk_sizenumber · default: 250 -
The maximum size of a chunk in words. This value cannot be higher than
300or lower than20(forsentencestrategy) or10(forwordstrategy). -
overlapnumber · default: 100 -
The number of overlapping words for chunks. It is applicable only to a
wordchunking strategy. This value cannot be higher than half themax_chunk_sizevalue. -
servicerequired -
The type of service supported for the specified task type. In this case,
anthropic. -
Values:
anthropic -
service_settingsobjectrequired -
Settings used to install the inference model. These settings are specific to the
watsonxaiservice. -
task_settingsobject -
Settings to configure the inference task. These settings are specific to the task type you specified.
-
max_tokensnumberrequired -
For a
completiontask, it is the maximum number of tokens to generate before stopping. -
temperaturenumber -
For a
completiontask, it is the amount of randomness injected into the response. For more details about the supported range, refer to Anthropic documentation. - External docs
-
top_knumber -
For a
completiontask, 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. -
top_pnumber -
For a
completiontask, 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.
Response
-
chunking_settingsobject -
Chunking configuration object
-
max_chunk_sizenumber · default: 250 -
The maximum size of a chunk in words. This value cannot be higher than
300or lower than20(forsentencestrategy) or10(forwordstrategy). -
overlapnumber · default: 100 -
The number of overlapping words for chunks. It is applicable only to a
wordchunking strategy. This value cannot be higher than half themax_chunk_sizevalue.