Package com.google.genai.types
Class ExternalApiElasticSearchParams
-
- All Implemented Interfaces:
public abstract class ExternalApiElasticSearchParams extends JsonSerializable
The search parameters to use for the ELASTIC_SEARCH spec. This data type is not supported in Gemini API.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classExternalApiElasticSearchParams.BuilderBuilder for ExternalApiElasticSearchParams.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description ExternalApiElasticSearchParams()
-
Method Summary
Modifier and Type Method Description abstract Optional<String>index()The ElasticSearch index to use. abstract Optional<Integer>numHits()Optional. abstract Optional<String>searchTemplate()The ElasticSearch search template to use. static ExternalApiElasticSearchParams.Builderbuilder()Instantiates a builder for ExternalApiElasticSearchParams. abstract ExternalApiElasticSearchParams.BuildertoBuilder()Creates a builder with the same values as this instance. static ExternalApiElasticSearchParamsfromJson(String jsonString)Deserializes a JSON string to a ExternalApiElasticSearchParams object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
numHits
abstract Optional<Integer> numHits()
Optional. Number of hits (chunks) to request. When specified, it is passed to Elasticsearch as the `num_hits` param.
-
searchTemplate
abstract Optional<String> searchTemplate()
The ElasticSearch search template to use.
-
builder
static ExternalApiElasticSearchParams.Builder builder()
Instantiates a builder for ExternalApiElasticSearchParams.
-
toBuilder
abstract ExternalApiElasticSearchParams.Builder toBuilder()
Creates a builder with the same values as this instance.
-
fromJson
static ExternalApiElasticSearchParams fromJson(String jsonString)
Deserializes a JSON string to a ExternalApiElasticSearchParams object.
-
-
-
-