Class RateLimitSetting

java.lang.Object
co.elastic.clients.elasticsearch.inference.RateLimitSetting
All Implemented Interfaces:
JsonpSerializable

@JsonpDeserializable public class RateLimitSetting extends Object implements JsonpSerializable
This setting helps to minimize the number of rate limit errors returned from the service.
See Also:
  • Field Details

  • Method Details

    • of

    • requestsPerMinute

      @Nullable public final Integer requestsPerMinute()
      The number of requests allowed per minute. By default, the number of requests allowed per minute is set by each service as follows:
      • alibabacloud-ai-search service: 1000
      • anthropic service: 50
      • azureaistudio service: 240
      • azureopenai service and task type text_embedding: 1440
      • azureopenai service and task type completion: 120
      • cohere service: 10000
      • elastic service and task type chat_completion: 240
      • googleaistudio service: 360
      • googlevertexai service: 30000
      • hugging_face service: 3000
      • jinaai service: 2000
      • mistral service: 240
      • openai service and task type text_embedding: 3000
      • openai service and task type completion: 500
      • voyageai service: 2000
      • watsonxai service: 120

      API name: requests_per_minute

    • serialize

      public void serialize(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
      Serialize this object to JSON.
      Specified by:
      serialize in interface JsonpSerializable
    • serializeInternal

      protected void serializeInternal(jakarta.json.stream.JsonGenerator generator, JsonpMapper mapper)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setupRateLimitSettingDeserializer

      protected static void setupRateLimitSettingDeserializer(ObjectDeserializer<RateLimitSetting.Builder> op)