content() {
+ return this.content;
+ }
+
/**
* The create time.
*
@@ -177,6 +194,17 @@ public final String response() {
return this.response;
}
+ /**
+ * The role of the message.
+ *
+ * API name: {@code role}
+ *
+ */
+ @Nullable
+ public final String role() {
+ return this.role;
+ }
+
/**
* The trace number.
*
@@ -209,6 +237,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeEnd();
}
+ if (ApiTypeHelper.isDefined(this.content)) {
+ generator.writeKey("content");
+ generator.writeStartArray();
+ for (Content item0 : this.content) {
+ item0.serialize(generator, mapper);
+ }
+ generator.writeEnd();
+ }
+
if (this.createTime != null) {
generator.writeKey("create_time");
generator.write(this.createTime);
@@ -249,6 +286,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write(this.response);
}
+ if (this.role != null) {
+ generator.writeKey("role");
+ generator.write(this.role);
+ }
+
if (this.traceNumber != null) {
generator.writeKey("trace_number");
generator.write(this.traceNumber);
@@ -275,6 +317,8 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
@Nullable
private Map additionalInfo;
@Nullable
+ private List content;
+ @Nullable
private String createTime;
@Nullable
private String input;
@@ -291,12 +335,15 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
@Nullable
private String response;
@Nullable
+ private String role;
+ @Nullable
private Long traceNumber;
public Builder() {}
private Builder(GetMessageResponse o) {
this.additionalInfo = _mapCopy(o.additionalInfo);
+ this.content = _listCopy(o.content);
this.createTime = o.createTime;
this.input = o.input;
this.memoryId = o.memoryId;
@@ -305,11 +352,13 @@ private Builder(GetMessageResponse o) {
this.parentMessageId = o.parentMessageId;
this.promptTemplate = o.promptTemplate;
this.response = o.response;
+ this.role = o.role;
this.traceNumber = o.traceNumber;
}
private Builder(Builder o) {
this.additionalInfo = _mapCopy(o.additionalInfo);
+ this.content = _listCopy(o.content);
this.createTime = o.createTime;
this.input = o.input;
this.memoryId = o.memoryId;
@@ -318,6 +367,7 @@ private Builder(Builder o) {
this.parentMessageId = o.parentMessageId;
this.promptTemplate = o.promptTemplate;
this.response = o.response;
+ this.role = o.role;
this.traceNumber = o.traceNumber;
}
@@ -353,6 +403,44 @@ public final Builder additionalInfo(String key, JsonData value) {
return this;
}
+ /**
+ * API name: {@code content}
+ *
+ *
+ * Adds all elements of list to content.
+ *
+ */
+ @Nonnull
+ public final Builder content(List list) {
+ this.content = _listAddAll(this.content, list);
+ return this;
+ }
+
+ /**
+ * API name: {@code content}
+ *
+ *
+ * Adds one or more values to content.
+ *
+ */
+ @Nonnull
+ public final Builder content(Content value, Content... values) {
+ this.content = _listAdd(this.content, value, values);
+ return this;
+ }
+
+ /**
+ * API name: {@code content}
+ *
+ *
+ * Adds a value to content using a builder lambda.
+ *
+ */
+ @Nonnull
+ public final Builder content(Function> fn) {
+ return content(fn.apply(new Content.Builder()).build());
+ }
+
/**
* The create time.
*
@@ -443,6 +531,18 @@ public final Builder response(@Nullable String value) {
return this;
}
+ /**
+ * The role of the message.
+ *
+ * API name: {@code role}
+ *
+ */
+ @Nonnull
+ public final Builder role(@Nullable String value) {
+ this.role = value;
+ return this;
+ }
+
/**
* The trace number.
*
@@ -481,6 +581,7 @@ public GetMessageResponse build() {
protected static void setupGetMessageResponseDeserializer(ObjectDeserializer op) {
op.add(Builder::additionalInfo, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "additional_info");
+ op.add(Builder::content, JsonpDeserializer.arrayDeserializer(Content._DESERIALIZER), "content");
op.add(Builder::createTime, JsonpDeserializer.stringDeserializer(), "create_time");
op.add(Builder::input, JsonpDeserializer.stringDeserializer(), "input");
op.add(Builder::memoryId, JsonpDeserializer.stringDeserializer(), "memory_id");
@@ -489,6 +590,7 @@ protected static void setupGetMessageResponseDeserializer(ObjectDeserializer parameters;
+ @Nullable
+ private final Parameters parameters;
// ---------------------------------------------------------------------------------------------
private LLM(Builder builder) {
this.modelId = builder.modelId;
- this.parameters = ApiTypeHelper.unmodifiable(builder.parameters);
+ this.parameters = builder.parameters;
}
public static LLM of(Function> fn) {
@@ -66,8 +63,8 @@ public final String modelId() {
/**
* API name: {@code parameters}
*/
- @Nonnull
- public final Map parameters() {
+ @Nullable
+ public final Parameters parameters() {
return this.parameters;
}
@@ -87,14 +84,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write(this.modelId);
}
- if (ApiTypeHelper.isDefined(this.parameters)) {
+ if (this.parameters != null) {
generator.writeKey("parameters");
- generator.writeStartObject();
- for (Map.Entry item0 : this.parameters.entrySet()) {
- generator.writeKey(item0.getKey());
- item0.getValue().serialize(generator, mapper);
- }
- generator.writeEnd();
+ this.parameters.serialize(generator, mapper);
}
}
@@ -118,18 +110,18 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
@Nullable
private String modelId;
@Nullable
- private Map parameters;
+ private Parameters parameters;
public Builder() {}
private Builder(LLM o) {
this.modelId = o.modelId;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
}
private Builder(Builder o) {
this.modelId = o.modelId;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
}
@Override
@@ -149,28 +141,19 @@ public final Builder modelId(@Nullable String value) {
/**
* API name: {@code parameters}
- *
- *
- * Adds all elements of map to parameters.
- *
*/
@Nonnull
- public final Builder parameters(Map map) {
- this.parameters = _mapPutAll(this.parameters, map);
+ public final Builder parameters(@Nullable Parameters value) {
+ this.parameters = value;
return this;
}
/**
* API name: {@code parameters}
- *
- *
- * Adds an entry to parameters.
- *
*/
@Nonnull
- public final Builder parameters(String key, JsonData value) {
- this.parameters = _mapPut(this.parameters, key, value);
- return this;
+ public final Builder parameters(Function> fn) {
+ return parameters(fn.apply(new Parameters.Builder()).build());
}
/**
@@ -196,7 +179,7 @@ public LLM build() {
protected static void setupLLMDeserializer(ObjectDeserializer op) {
op.add(Builder::modelId, JsonpDeserializer.stringDeserializer(), "model_id");
- op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters");
+ op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters");
}
@Override
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Message.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Message.java
index 8f9597f8e6..4224758da3 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Message.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Message.java
@@ -13,6 +13,7 @@
package org.opensearch.client.opensearch.ml;
import jakarta.json.stream.JsonGenerator;
+import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.function.Function;
@@ -41,6 +42,9 @@ public class Message implements PlainJsonSerializable, ToCopyableBuilder additionalInfo;
+ @Nonnull
+ private final List content;
+
@Nullable
private final String createTime;
@@ -65,6 +69,9 @@ public class Message implements PlainJsonSerializable, ToCopyableBuilder additionalInfo() {
return this.additionalInfo;
}
+ /**
+ * API name: {@code content}
+ */
+ @Nonnull
+ public final List content() {
+ return this.content;
+ }
+
/**
* The create time.
*
@@ -177,6 +194,17 @@ public final String response() {
return this.response;
}
+ /**
+ * The role of the message.
+ *
+ * API name: {@code role}
+ *
+ */
+ @Nullable
+ public final String role() {
+ return this.role;
+ }
+
/**
* The trace number.
*
@@ -209,6 +237,15 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeEnd();
}
+ if (ApiTypeHelper.isDefined(this.content)) {
+ generator.writeKey("content");
+ generator.writeStartArray();
+ for (Content item0 : this.content) {
+ item0.serialize(generator, mapper);
+ }
+ generator.writeEnd();
+ }
+
if (this.createTime != null) {
generator.writeKey("create_time");
generator.write(this.createTime);
@@ -249,6 +286,11 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write(this.response);
}
+ if (this.role != null) {
+ generator.writeKey("role");
+ generator.write(this.role);
+ }
+
if (this.traceNumber != null) {
generator.writeKey("trace_number");
generator.write(this.traceNumber);
@@ -275,6 +317,8 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
@Nullable
private Map additionalInfo;
@Nullable
+ private List content;
+ @Nullable
private String createTime;
@Nullable
private String input;
@@ -291,12 +335,15 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
@Nullable
private String response;
@Nullable
+ private String role;
+ @Nullable
private Long traceNumber;
public Builder() {}
private Builder(Message o) {
this.additionalInfo = _mapCopy(o.additionalInfo);
+ this.content = _listCopy(o.content);
this.createTime = o.createTime;
this.input = o.input;
this.memoryId = o.memoryId;
@@ -305,11 +352,13 @@ private Builder(Message o) {
this.parentMessageId = o.parentMessageId;
this.promptTemplate = o.promptTemplate;
this.response = o.response;
+ this.role = o.role;
this.traceNumber = o.traceNumber;
}
private Builder(Builder o) {
this.additionalInfo = _mapCopy(o.additionalInfo);
+ this.content = _listCopy(o.content);
this.createTime = o.createTime;
this.input = o.input;
this.memoryId = o.memoryId;
@@ -318,6 +367,7 @@ private Builder(Builder o) {
this.parentMessageId = o.parentMessageId;
this.promptTemplate = o.promptTemplate;
this.response = o.response;
+ this.role = o.role;
this.traceNumber = o.traceNumber;
}
@@ -353,6 +403,44 @@ public final Builder additionalInfo(String key, JsonData value) {
return this;
}
+ /**
+ * API name: {@code content}
+ *
+ *
+ * Adds all elements of list to content.
+ *
+ */
+ @Nonnull
+ public final Builder content(List list) {
+ this.content = _listAddAll(this.content, list);
+ return this;
+ }
+
+ /**
+ * API name: {@code content}
+ *
+ *
+ * Adds one or more values to content.
+ *
+ */
+ @Nonnull
+ public final Builder content(Content value, Content... values) {
+ this.content = _listAdd(this.content, value, values);
+ return this;
+ }
+
+ /**
+ * API name: {@code content}
+ *
+ *
+ * Adds a value to content using a builder lambda.
+ *
+ */
+ @Nonnull
+ public final Builder content(Function> fn) {
+ return content(fn.apply(new Content.Builder()).build());
+ }
+
/**
* The create time.
*
@@ -443,6 +531,18 @@ public final Builder response(@Nullable String value) {
return this;
}
+ /**
+ * The role of the message.
+ *
+ * API name: {@code role}
+ *
+ */
+ @Nonnull
+ public final Builder role(@Nullable String value) {
+ this.role = value;
+ return this;
+ }
+
/**
* The trace number.
*
@@ -481,6 +581,7 @@ public Message build() {
protected static void setupMessageDeserializer(ObjectDeserializer op) {
op.add(Builder::additionalInfo, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "additional_info");
+ op.add(Builder::content, JsonpDeserializer.arrayDeserializer(Content._DESERIALIZER), "content");
op.add(Builder::createTime, JsonpDeserializer.stringDeserializer(), "create_time");
op.add(Builder::input, JsonpDeserializer.stringDeserializer(), "input");
op.add(Builder::memoryId, JsonpDeserializer.stringDeserializer(), "memory_id");
@@ -489,6 +590,7 @@ protected static void setupMessageDeserializer(ObjectDeserializer {
+
+ @Nullable
+ private final String content;
+
+ @Nullable
+ private final String role;
+
+ // ---------------------------------------------------------------------------------------------
+
+ private Messages(Builder builder) {
+ this.content = builder.content;
+ this.role = builder.role;
+ }
+
+ public static Messages of(Function> fn) {
+ return fn.apply(new Builder()).build();
+ }
+
+ /**
+ * The content of the message.
+ *
+ * API name: {@code content}
+ *
+ */
+ @Nullable
+ public final String content() {
+ return this.content;
+ }
+
+ /**
+ * The role of the message.
+ *
+ * API name: {@code role}
+ *
+ */
+ @Nullable
+ public final String role() {
+ return this.role;
+ }
+
+ /**
+ * Serialize this object to JSON.
+ */
+ @Override
+ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
+ generator.writeStartObject();
+ serializeInternal(generator, mapper);
+ generator.writeEnd();
+ }
+
+ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
+ if (this.content != null) {
+ generator.writeKey("content");
+ generator.write(this.content);
+ }
+
+ if (this.role != null) {
+ generator.writeKey("role");
+ generator.write(this.role);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ @Override
+ @Nonnull
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ @Nonnull
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Builder for {@link Messages}.
+ */
+ public static class Builder extends ObjectBuilderBase implements CopyableBuilder {
+ @Nullable
+ private String content;
+ @Nullable
+ private String role;
+
+ public Builder() {}
+
+ private Builder(Messages o) {
+ this.content = o.content;
+ this.role = o.role;
+ }
+
+ private Builder(Builder o) {
+ this.content = o.content;
+ this.role = o.role;
+ }
+
+ @Override
+ @Nonnull
+ public Builder copy() {
+ return new Builder(this);
+ }
+
+ /**
+ * The content of the message.
+ *
+ * API name: {@code content}
+ *
+ */
+ @Nonnull
+ public final Builder content(@Nullable String value) {
+ this.content = value;
+ return this;
+ }
+
+ /**
+ * The role of the message.
+ *
+ * API name: {@code role}
+ *
+ */
+ @Nonnull
+ public final Builder role(@Nullable String value) {
+ this.role = value;
+ return this;
+ }
+
+ /**
+ * Builds a {@link Messages}.
+ *
+ * @throws NullPointerException if some of the required fields are null.
+ */
+ @Override
+ @Nonnull
+ public Messages build() {
+ _checkSingleUse();
+
+ return new Messages(this);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link Messages}
+ */
+ public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(
+ Builder::new,
+ Messages::setupMessagesDeserializer
+ );
+
+ protected static void setupMessagesDeserializer(ObjectDeserializer op) {
+ op.add(Builder::content, JsonpDeserializer.stringDeserializer(), "content");
+ op.add(Builder::role, JsonpDeserializer.stringDeserializer(), "role");
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + Objects.hashCode(this.content);
+ result = 31 * result + Objects.hashCode(this.role);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ Messages other = (Messages) o;
+ return Objects.equals(this.content, other.content) && Objects.equals(this.role, other.role);
+ }
+}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Parameters.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Parameters.java
new file mode 100644
index 0000000000..0fc173cb57
--- /dev/null
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/Parameters.java
@@ -0,0 +1,349 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * The OpenSearch Contributors require contributions made to
+ * this file be licensed under the Apache-2.0 license or a
+ * compatible open source license.
+ */
+
+//----------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------
+
+package org.opensearch.client.opensearch.ml;
+
+import jakarta.json.stream.JsonGenerator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.function.Function;
+import javax.annotation.Generated;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import org.opensearch.client.json.JsonData;
+import org.opensearch.client.json.JsonpDeserializable;
+import org.opensearch.client.json.JsonpDeserializer;
+import org.opensearch.client.json.JsonpMapper;
+import org.opensearch.client.json.ObjectBuilderDeserializer;
+import org.opensearch.client.json.ObjectDeserializer;
+import org.opensearch.client.json.PlainJsonSerializable;
+import org.opensearch.client.util.ApiTypeHelper;
+import org.opensearch.client.util.CopyableBuilder;
+import org.opensearch.client.util.ObjectBuilder;
+import org.opensearch.client.util.ObjectBuilderBase;
+import org.opensearch.client.util.ToCopyableBuilder;
+
+// typedef: ml.Parameters
+
+@JsonpDeserializable
+@Generated("org.opensearch.client.codegen.CodeGenerator")
+public class Parameters implements PlainJsonSerializable, ToCopyableBuilder {
+
+ @Nullable
+ private final String inputs;
+
+ @Nullable
+ private final String llmInterface;
+
+ @Nonnull
+ private final List messages;
+
+ @Nonnull
+ private final Map metadata;
+
+ @Nullable
+ private final String question;
+
+ // ---------------------------------------------------------------------------------------------
+
+ private Parameters(Builder builder) {
+ this.inputs = builder.inputs;
+ this.llmInterface = builder.llmInterface;
+ this.messages = ApiTypeHelper.unmodifiable(builder.messages);
+ this.metadata = ApiTypeHelper.unmodifiable(builder.metadata);
+ this.question = builder.question;
+ }
+
+ public static Parameters of(Function> fn) {
+ return fn.apply(new Builder()).build();
+ }
+
+ /**
+ * API name: {@code inputs}
+ */
+ @Nullable
+ public final String inputs() {
+ return this.inputs;
+ }
+
+ /**
+ * API name: {@code _llm_interface}
+ */
+ @Nullable
+ public final String llmInterface() {
+ return this.llmInterface;
+ }
+
+ /**
+ * API name: {@code messages}
+ */
+ @Nonnull
+ public final List messages() {
+ return this.messages;
+ }
+
+ @Nonnull
+ public final Map metadata() {
+ return this.metadata;
+ }
+
+ /**
+ * API name: {@code question}
+ */
+ @Nullable
+ public final String question() {
+ return this.question;
+ }
+
+ /**
+ * Serialize this object to JSON.
+ */
+ @Override
+ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
+ generator.writeStartObject();
+ serializeInternal(generator, mapper);
+ generator.writeEnd();
+ }
+
+ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
+ for (Map.Entry item0 : this.metadata.entrySet()) {
+ generator.writeKey(item0.getKey());
+ item0.getValue().serialize(generator, mapper);
+ }
+ if (this.inputs != null) {
+ generator.writeKey("inputs");
+ generator.write(this.inputs);
+ }
+
+ if (this.llmInterface != null) {
+ generator.writeKey("_llm_interface");
+ generator.write(this.llmInterface);
+ }
+
+ if (ApiTypeHelper.isDefined(this.messages)) {
+ generator.writeKey("messages");
+ generator.writeStartArray();
+ for (Messages item0 : this.messages) {
+ item0.serialize(generator, mapper);
+ }
+ generator.writeEnd();
+ }
+
+ if (this.question != null) {
+ generator.writeKey("question");
+ generator.write(this.question);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ @Override
+ @Nonnull
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ @Nonnull
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Builder for {@link Parameters}.
+ */
+ public static class Builder extends ObjectBuilderBase implements CopyableBuilder {
+ @Nullable
+ private String inputs;
+ @Nullable
+ private String llmInterface;
+ @Nullable
+ private List messages;
+ @Nullable
+ private Map metadata;
+ @Nullable
+ private String question;
+
+ public Builder() {}
+
+ private Builder(Parameters o) {
+ this.inputs = o.inputs;
+ this.llmInterface = o.llmInterface;
+ this.messages = _listCopy(o.messages);
+ this.metadata = _mapCopy(o.metadata);
+ this.question = o.question;
+ }
+
+ private Builder(Builder o) {
+ this.inputs = o.inputs;
+ this.llmInterface = o.llmInterface;
+ this.messages = _listCopy(o.messages);
+ this.metadata = _mapCopy(o.metadata);
+ this.question = o.question;
+ }
+
+ @Override
+ @Nonnull
+ public Builder copy() {
+ return new Builder(this);
+ }
+
+ /**
+ * API name: {@code inputs}
+ */
+ @Nonnull
+ public final Builder inputs(@Nullable String value) {
+ this.inputs = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code _llm_interface}
+ */
+ @Nonnull
+ public final Builder llmInterface(@Nullable String value) {
+ this.llmInterface = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code messages}
+ *
+ *
+ * Adds all elements of list to messages.
+ *
+ */
+ @Nonnull
+ public final Builder messages(List list) {
+ this.messages = _listAddAll(this.messages, list);
+ return this;
+ }
+
+ /**
+ * API name: {@code messages}
+ *
+ *
+ * Adds one or more values to messages.
+ *
+ */
+ @Nonnull
+ public final Builder messages(Messages value, Messages... values) {
+ this.messages = _listAdd(this.messages, value, values);
+ return this;
+ }
+
+ /**
+ * API name: {@code messages}
+ *
+ *
+ * Adds a value to messages using a builder lambda.
+ *
+ */
+ @Nonnull
+ public final Builder messages(Function> fn) {
+ return messages(fn.apply(new Messages.Builder()).build());
+ }
+
+ /**
+ *
+ *
+ * Adds all elements of map to metadata.
+ *
+ */
+ @Nonnull
+ public final Builder metadata(Map map) {
+ this.metadata = _mapPutAll(this.metadata, map);
+ return this;
+ }
+
+ /**
+ *
+ *
+ * Adds an entry to metadata.
+ *
+ */
+ @Nonnull
+ public final Builder metadata(String key, JsonData value) {
+ this.metadata = _mapPut(this.metadata, key, value);
+ return this;
+ }
+
+ /**
+ * API name: {@code question}
+ */
+ @Nonnull
+ public final Builder question(@Nullable String value) {
+ this.question = value;
+ return this;
+ }
+
+ /**
+ * Builds a {@link Parameters}.
+ *
+ * @throws NullPointerException if some of the required fields are null.
+ */
+ @Override
+ @Nonnull
+ public Parameters build() {
+ _checkSingleUse();
+
+ return new Parameters(this);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link Parameters}
+ */
+ public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(
+ Builder::new,
+ Parameters::setupParametersDeserializer
+ );
+
+ protected static void setupParametersDeserializer(ObjectDeserializer op) {
+ op.add(Builder::inputs, JsonpDeserializer.stringDeserializer(), "inputs");
+ op.add(Builder::llmInterface, JsonpDeserializer.stringDeserializer(), "_llm_interface");
+ op.add(Builder::messages, JsonpDeserializer.arrayDeserializer(Messages._DESERIALIZER), "messages");
+ op.add(Builder::question, JsonpDeserializer.stringDeserializer(), "question");
+ op.setUnknownFieldHandler((builder, name, parser, mapper) -> {
+ if (builder.metadata == null) {
+ builder.metadata = new HashMap<>();
+ }
+ builder.metadata.put(name, JsonData._DESERIALIZER.deserialize(parser, mapper));
+ });
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + Objects.hashCode(this.inputs);
+ result = 31 * result + Objects.hashCode(this.llmInterface);
+ result = 31 * result + Objects.hashCode(this.messages);
+ result = 31 * result + Objects.hashCode(this.metadata);
+ result = 31 * result + Objects.hashCode(this.question);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ Parameters other = (Parameters) o;
+ return Objects.equals(this.inputs, other.inputs)
+ && Objects.equals(this.llmInterface, other.llmInterface)
+ && Objects.equals(this.messages, other.messages)
+ && Objects.equals(this.metadata, other.metadata)
+ && Objects.equals(this.question, other.question);
+ }
+}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/PredictModelStreamRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/PredictModelStreamRequest.java
index ed3f164fd1..c7408b66fc 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/PredictModelStreamRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/PredictModelStreamRequest.java
@@ -18,7 +18,6 @@
import java.util.function.Function;
import javax.annotation.Generated;
import javax.annotation.Nonnull;
-import org.opensearch.client.json.JsonData;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -50,14 +49,14 @@ public final class PredictModelStreamRequest extends RequestBase
private final String modelId;
@Nonnull
- private final Map parameters;
+ private final Parameters parameters;
// ---------------------------------------------------------------------------------------------
private PredictModelStreamRequest(Builder builder) {
super(builder);
this.modelId = ApiTypeHelper.requireNonNull(builder.modelId, this, "modelId");
- this.parameters = ApiTypeHelper.unmodifiableRequired(builder.parameters, this, "parameters");
+ this.parameters = ApiTypeHelper.requireNonNull(builder.parameters, this, "parameters");
}
public static PredictModelStreamRequest of(Function> fn) {
@@ -76,7 +75,7 @@ public final String modelId() {
* Required - API name: {@code parameters}
*/
@Nonnull
- public final Map parameters() {
+ public final Parameters parameters() {
return this.parameters;
}
@@ -92,12 +91,7 @@ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("parameters");
- generator.writeStartObject();
- for (Map.Entry item0 : this.parameters.entrySet()) {
- generator.writeKey(item0.getKey());
- item0.getValue().serialize(generator, mapper);
- }
- generator.writeEnd();
+ this.parameters.serialize(generator, mapper);
}
// ---------------------------------------------------------------------------------------------
@@ -120,20 +114,20 @@ public static class Builder extends RequestBase.AbstractBuilder
implements
CopyableBuilder {
private String modelId;
- private Map parameters;
+ private Parameters parameters;
public Builder() {}
private Builder(PredictModelStreamRequest o) {
super(o);
this.modelId = o.modelId;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
}
private Builder(Builder o) {
super(o);
this.modelId = o.modelId;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
}
@Override
@@ -159,28 +153,19 @@ public final Builder modelId(String value) {
/**
* Required - API name: {@code parameters}
- *
- *
- * Adds all elements of map to parameters.
- *
*/
@Nonnull
- public final Builder parameters(Map map) {
- this.parameters = _mapPutAll(this.parameters, map);
+ public final Builder parameters(Parameters value) {
+ this.parameters = value;
return this;
}
/**
* Required - API name: {@code parameters}
- *
- *
- * Adds an entry to parameters.
- *
*/
@Nonnull
- public final Builder parameters(String key, JsonData value) {
- this.parameters = _mapPut(this.parameters, key, value);
- return this;
+ public final Builder parameters(Function> fn) {
+ return parameters(fn.apply(new Parameters.Builder()).build());
}
/**
@@ -208,7 +193,7 @@ public PredictModelStreamRequest build() {
);
protected static void setupPredictModelStreamRequestDeserializer(ObjectDeserializer op) {
- op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters");
+ op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters");
}
// ---------------------------------------------------------------------------------------------
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java
index f2d070c942..637bca1c5f 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/RegisterAgentsRequest.java
@@ -21,7 +21,6 @@
import javax.annotation.Generated;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import org.opensearch.client.json.JsonData;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -64,8 +63,8 @@ public final class RegisterAgentsRequest extends RequestBase
@Nonnull
private final String name;
- @Nonnull
- private final Map parameters;
+ @Nullable
+ private final Parameters parameters;
@Nonnull
private final List tools;
@@ -82,7 +81,7 @@ private RegisterAgentsRequest(Builder builder) {
this.llm = builder.llm;
this.memory = builder.memory;
this.name = ApiTypeHelper.requireNonNull(builder.name, this, "name");
- this.parameters = ApiTypeHelper.unmodifiable(builder.parameters);
+ this.parameters = builder.parameters;
this.tools = ApiTypeHelper.unmodifiable(builder.tools);
this.type = ApiTypeHelper.requireNonNull(builder.type, this, "type");
}
@@ -134,8 +133,8 @@ public final String name() {
/**
* API name: {@code parameters}
*/
- @Nonnull
- public final Map parameters() {
+ @Nullable
+ public final Parameters parameters() {
return this.parameters;
}
@@ -189,14 +188,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.writeKey("name");
generator.write(this.name);
- if (ApiTypeHelper.isDefined(this.parameters)) {
+ if (this.parameters != null) {
generator.writeKey("parameters");
- generator.writeStartObject();
- for (Map.Entry item0 : this.parameters.entrySet()) {
- generator.writeKey(item0.getKey());
- item0.getValue().serialize(generator, mapper);
- }
- generator.writeEnd();
+ this.parameters.serialize(generator, mapper);
}
if (ApiTypeHelper.isDefined(this.tools)) {
@@ -239,7 +233,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme
private Memory memory;
private String name;
@Nullable
- private Map parameters;
+ private Parameters parameters;
@Nullable
private List tools;
private String type;
@@ -253,7 +247,7 @@ private Builder(RegisterAgentsRequest o) {
this.llm = o.llm;
this.memory = o.memory;
this.name = o.name;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
this.tools = _listCopy(o.tools);
this.type = o.type;
}
@@ -265,7 +259,7 @@ private Builder(Builder o) {
this.llm = o.llm;
this.memory = o.memory;
this.name = o.name;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
this.tools = _listCopy(o.tools);
this.type = o.type;
}
@@ -345,28 +339,19 @@ public final Builder name(String value) {
/**
* API name: {@code parameters}
- *
- *
- * Adds all elements of map to parameters.
- *
*/
@Nonnull
- public final Builder parameters(Map map) {
- this.parameters = _mapPutAll(this.parameters, map);
+ public final Builder parameters(@Nullable Parameters value) {
+ this.parameters = value;
return this;
}
/**
* API name: {@code parameters}
- *
- *
- * Adds an entry to parameters.
- *
*/
@Nonnull
- public final Builder parameters(String key, JsonData value) {
- this.parameters = _mapPut(this.parameters, key, value);
- return this;
+ public final Builder parameters(Function> fn) {
+ return parameters(fn.apply(new Parameters.Builder()).build());
}
/**
@@ -446,7 +431,7 @@ protected static void setupRegisterAgentsRequestDeserializer(ObjectDeserializer<
op.add(Builder::llm, LLM._DESERIALIZER, "llm");
op.add(Builder::memory, Memory._DESERIALIZER, "memory");
op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name");
- op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters");
+ op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters");
op.add(Builder::tools, JsonpDeserializer.arrayDeserializer(ToolItems._DESERIALIZER), "tools");
op.add(Builder::type, JsonpDeserializer.stringDeserializer(), "type");
}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ToolItems.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ToolItems.java
index 6c8e1519a1..a42676e36e 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ToolItems.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/ToolItems.java
@@ -54,8 +54,8 @@ public class ToolItems implements PlainJsonSerializable, ToCopyableBuilder parameters;
+ @Nullable
+ private final Parameters parameters;
@Nullable
private final String type;
@@ -68,7 +68,7 @@ private ToolItems(Builder builder) {
this.includeOutputInAgentResponse = builder.includeOutputInAgentResponse;
this.metadata = ApiTypeHelper.unmodifiable(builder.metadata);
this.name = builder.name;
- this.parameters = ApiTypeHelper.unmodifiable(builder.parameters);
+ this.parameters = builder.parameters;
this.type = builder.type;
}
@@ -116,8 +116,8 @@ public final String name() {
/**
* API name: {@code parameters}
*/
- @Nonnull
- public final Map parameters() {
+ @Nullable
+ public final Parameters parameters() {
return this.parameters;
}
@@ -164,14 +164,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write(this.name);
}
- if (ApiTypeHelper.isDefined(this.parameters)) {
+ if (this.parameters != null) {
generator.writeKey("parameters");
- generator.writeStartObject();
- for (Map.Entry item0 : this.parameters.entrySet()) {
- generator.writeKey(item0.getKey());
- item0.getValue().serialize(generator, mapper);
- }
- generator.writeEnd();
+ this.parameters.serialize(generator, mapper);
}
if (this.type != null) {
@@ -208,7 +203,7 @@ public static class Builder extends ObjectBuilderBase implements CopyableBuilder
@Nullable
private String name;
@Nullable
- private Map parameters;
+ private Parameters parameters;
@Nullable
private String type;
@@ -220,7 +215,7 @@ private Builder(ToolItems o) {
this.includeOutputInAgentResponse = o.includeOutputInAgentResponse;
this.metadata = _mapCopy(o.metadata);
this.name = o.name;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
this.type = o.type;
}
@@ -230,7 +225,7 @@ private Builder(Builder o) {
this.includeOutputInAgentResponse = o.includeOutputInAgentResponse;
this.metadata = _mapCopy(o.metadata);
this.name = o.name;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
this.type = o.type;
}
@@ -310,28 +305,19 @@ public final Builder name(@Nullable String value) {
/**
* API name: {@code parameters}
- *
- *
- * Adds all elements of map to parameters.
- *
*/
@Nonnull
- public final Builder parameters(Map map) {
- this.parameters = _mapPutAll(this.parameters, map);
+ public final Builder parameters(@Nullable Parameters value) {
+ this.parameters = value;
return this;
}
/**
* API name: {@code parameters}
- *
- *
- * Adds an entry to parameters.
- *
*/
@Nonnull
- public final Builder parameters(String key, JsonData value) {
- this.parameters = _mapPut(this.parameters, key, value);
- return this;
+ public final Builder parameters(Function> fn) {
+ return parameters(fn.apply(new Parameters.Builder()).build());
}
/**
@@ -372,7 +358,7 @@ protected static void setupToolItemsDeserializer(ObjectDeserializer {
if (builder.metadata == null) {
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UpdateConnectorRequest.java b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UpdateConnectorRequest.java
index 011c5d8aa1..33ccfbad18 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UpdateConnectorRequest.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/ml/UpdateConnectorRequest.java
@@ -21,7 +21,6 @@
import javax.annotation.Generated;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
-import org.opensearch.client.json.JsonData;
import org.opensearch.client.json.JsonpDeserializable;
import org.opensearch.client.json.JsonpDeserializer;
import org.opensearch.client.json.JsonpMapper;
@@ -70,8 +69,8 @@ public final class UpdateConnectorRequest extends RequestBase
@Nullable
private final String name;
- @Nonnull
- private final Map parameters;
+ @Nullable
+ private final Parameters parameters;
@Nullable
private final Boolean parametersSkipValidatingMissingParameters;
@@ -93,7 +92,7 @@ private UpdateConnectorRequest(Builder builder) {
this.credential = builder.credential;
this.description = builder.description;
this.name = builder.name;
- this.parameters = ApiTypeHelper.unmodifiable(builder.parameters);
+ this.parameters = builder.parameters;
this.parametersSkipValidatingMissingParameters = builder.parametersSkipValidatingMissingParameters;
this.protocol = builder.protocol;
this.version = builder.version;
@@ -168,8 +167,8 @@ public final String name() {
/**
* API name: {@code parameters}
*/
- @Nonnull
- public final Map parameters() {
+ @Nullable
+ public final Parameters parameters() {
return this.parameters;
}
@@ -249,14 +248,9 @@ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
generator.write(this.name);
}
- if (ApiTypeHelper.isDefined(this.parameters)) {
+ if (this.parameters != null) {
generator.writeKey("parameters");
- generator.writeStartObject();
- for (Map.Entry item0 : this.parameters.entrySet()) {
- generator.writeKey(item0.getKey());
- item0.getValue().serialize(generator, mapper);
- }
- generator.writeEnd();
+ this.parameters.serialize(generator, mapper);
}
if (this.parametersSkipValidatingMissingParameters != null) {
@@ -306,7 +300,7 @@ public static class Builder extends RequestBase.AbstractBuilder impleme
@Nullable
private String name;
@Nullable
- private Map parameters;
+ private Parameters parameters;
@Nullable
private Boolean parametersSkipValidatingMissingParameters;
@Nullable
@@ -325,7 +319,7 @@ private Builder(UpdateConnectorRequest o) {
this.credential = o.credential;
this.description = o.description;
this.name = o.name;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
this.parametersSkipValidatingMissingParameters = o.parametersSkipValidatingMissingParameters;
this.protocol = o.protocol;
this.version = o.version;
@@ -340,7 +334,7 @@ private Builder(Builder o) {
this.credential = o.credential;
this.description = o.description;
this.name = o.name;
- this.parameters = _mapCopy(o.parameters);
+ this.parameters = o.parameters;
this.parametersSkipValidatingMissingParameters = o.parametersSkipValidatingMissingParameters;
this.protocol = o.protocol;
this.version = o.version;
@@ -486,28 +480,19 @@ public final Builder name(@Nullable String value) {
/**
* API name: {@code parameters}
- *
- *
- * Adds all elements of map to parameters.
- *
*/
@Nonnull
- public final Builder parameters(Map map) {
- this.parameters = _mapPutAll(this.parameters, map);
+ public final Builder parameters(@Nullable Parameters value) {
+ this.parameters = value;
return this;
}
/**
* API name: {@code parameters}
- *
- *
- * Adds an entry to parameters.
- *
*/
@Nonnull
- public final Builder parameters(String key, JsonData value) {
- this.parameters = _mapPut(this.parameters, key, value);
- return this;
+ public final Builder parameters(Function> fn) {
+ return parameters(fn.apply(new Parameters.Builder()).build());
}
/**
@@ -571,7 +556,7 @@ protected static void setupUpdateConnectorRequestDeserializer(ObjectDeserializer
op.add(Builder::credential, Credential._DESERIALIZER, "credential");
op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description");
op.add(Builder::name, JsonpDeserializer.stringDeserializer(), "name");
- op.add(Builder::parameters, JsonpDeserializer.stringMapDeserializer(JsonData._DESERIALIZER), "parameters");
+ op.add(Builder::parameters, Parameters._DESERIALIZER, "parameters");
op.add(
Builder::parametersSkipValidatingMissingParameters,
JsonpDeserializer.booleanDeserializer(),
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticContextResponseProcessor.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticContextResponseProcessor.java
new file mode 100644
index 0000000000..0831c90647
--- /dev/null
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticContextResponseProcessor.java
@@ -0,0 +1,345 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * The OpenSearch Contributors require contributions made to
+ * this file be licensed under the Apache-2.0 license or a
+ * compatible open source license.
+ */
+
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ * Modifications Copyright OpenSearch Contributors. See
+ * GitHub history for details.
+ */
+
+//----------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------
+
+package org.opensearch.client.opensearch.search_pipeline;
+
+import jakarta.json.stream.JsonGenerator;
+import java.util.Objects;
+import java.util.function.Function;
+import javax.annotation.Generated;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import org.opensearch.client.json.JsonpDeserializable;
+import org.opensearch.client.json.JsonpDeserializer;
+import org.opensearch.client.json.JsonpMapper;
+import org.opensearch.client.json.ObjectBuilderDeserializer;
+import org.opensearch.client.json.ObjectDeserializer;
+import org.opensearch.client.json.PlainJsonSerializable;
+import org.opensearch.client.util.CopyableBuilder;
+import org.opensearch.client.util.ObjectBuilder;
+import org.opensearch.client.util.ObjectBuilderBase;
+import org.opensearch.client.util.ToCopyableBuilder;
+
+// typedef: search_pipeline.AgenticContextResponseProcessor
+
+@JsonpDeserializable
+@Generated("org.opensearch.client.codegen.CodeGenerator")
+public class AgenticContextResponseProcessor
+ implements
+ ResponseProcessorVariant,
+ PlainJsonSerializable,
+ ToCopyableBuilder {
+
+ @Nullable
+ private final Boolean agentStepsSummary;
+
+ @Nullable
+ private final String description;
+
+ @Nullable
+ private final Boolean dslQuery;
+
+ @Nullable
+ private final Boolean ignoreFailure;
+
+ @Nullable
+ private final String tag;
+
+ // ---------------------------------------------------------------------------------------------
+
+ private AgenticContextResponseProcessor(Builder builder) {
+ this.agentStepsSummary = builder.agentStepsSummary;
+ this.description = builder.description;
+ this.dslQuery = builder.dslQuery;
+ this.ignoreFailure = builder.ignoreFailure;
+ this.tag = builder.tag;
+ }
+
+ public static AgenticContextResponseProcessor of(
+ Function> fn
+ ) {
+ return fn.apply(new Builder()).build();
+ }
+
+ /**
+ * {@link ResponseProcessor} variant kind.
+ */
+ @Override
+ public ResponseProcessor.Kind _responseProcessorKind() {
+ return ResponseProcessor.Kind.AgenticContext;
+ }
+
+ /**
+ * Whether to include the agent's execution step summary in the response. Available for conversational agents only.
+ *
+ * API name: {@code agent_steps_summary}
+ *
+ */
+ @Nullable
+ public final Boolean agentStepsSummary() {
+ return this.agentStepsSummary;
+ }
+
+ /**
+ * API name: {@code description}
+ */
+ @Nullable
+ public final String description() {
+ return this.description;
+ }
+
+ /**
+ * Whether to include the generated DSL query in the response. Available for both conversational and flow agents.
+ *
+ * API name: {@code dsl_query}
+ *
+ */
+ @Nullable
+ public final Boolean dslQuery() {
+ return this.dslQuery;
+ }
+
+ /**
+ * API name: {@code ignore_failure}
+ */
+ @Nullable
+ public final Boolean ignoreFailure() {
+ return this.ignoreFailure;
+ }
+
+ /**
+ * API name: {@code tag}
+ */
+ @Nullable
+ public final String tag() {
+ return this.tag;
+ }
+
+ /**
+ * Serialize this object to JSON.
+ */
+ @Override
+ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
+ generator.writeStartObject();
+ serializeInternal(generator, mapper);
+ generator.writeEnd();
+ }
+
+ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
+ if (this.agentStepsSummary != null) {
+ generator.writeKey("agent_steps_summary");
+ generator.write(this.agentStepsSummary);
+ }
+
+ if (this.description != null) {
+ generator.writeKey("description");
+ generator.write(this.description);
+ }
+
+ if (this.dslQuery != null) {
+ generator.writeKey("dsl_query");
+ generator.write(this.dslQuery);
+ }
+
+ if (this.ignoreFailure != null) {
+ generator.writeKey("ignore_failure");
+ generator.write(this.ignoreFailure);
+ }
+
+ if (this.tag != null) {
+ generator.writeKey("tag");
+ generator.write(this.tag);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ @Override
+ @Nonnull
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ @Nonnull
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Builder for {@link AgenticContextResponseProcessor}.
+ */
+ public static class Builder extends ObjectBuilderBase implements CopyableBuilder {
+ @Nullable
+ private Boolean agentStepsSummary;
+ @Nullable
+ private String description;
+ @Nullable
+ private Boolean dslQuery;
+ @Nullable
+ private Boolean ignoreFailure;
+ @Nullable
+ private String tag;
+
+ public Builder() {}
+
+ private Builder(AgenticContextResponseProcessor o) {
+ this.agentStepsSummary = o.agentStepsSummary;
+ this.description = o.description;
+ this.dslQuery = o.dslQuery;
+ this.ignoreFailure = o.ignoreFailure;
+ this.tag = o.tag;
+ }
+
+ private Builder(Builder o) {
+ this.agentStepsSummary = o.agentStepsSummary;
+ this.description = o.description;
+ this.dslQuery = o.dslQuery;
+ this.ignoreFailure = o.ignoreFailure;
+ this.tag = o.tag;
+ }
+
+ @Override
+ @Nonnull
+ public Builder copy() {
+ return new Builder(this);
+ }
+
+ /**
+ * Whether to include the agent's execution step summary in the response. Available for conversational agents only.
+ *
+ * API name: {@code agent_steps_summary}
+ *
+ */
+ @Nonnull
+ public final Builder agentStepsSummary(@Nullable Boolean value) {
+ this.agentStepsSummary = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code description}
+ */
+ @Nonnull
+ public final Builder description(@Nullable String value) {
+ this.description = value;
+ return this;
+ }
+
+ /**
+ * Whether to include the generated DSL query in the response. Available for both conversational and flow agents.
+ *
+ * API name: {@code dsl_query}
+ *
+ */
+ @Nonnull
+ public final Builder dslQuery(@Nullable Boolean value) {
+ this.dslQuery = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code ignore_failure}
+ */
+ @Nonnull
+ public final Builder ignoreFailure(@Nullable Boolean value) {
+ this.ignoreFailure = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code tag}
+ */
+ @Nonnull
+ public final Builder tag(@Nullable String value) {
+ this.tag = value;
+ return this;
+ }
+
+ /**
+ * Builds a {@link AgenticContextResponseProcessor}.
+ *
+ * @throws NullPointerException if some of the required fields are null.
+ */
+ @Override
+ @Nonnull
+ public AgenticContextResponseProcessor build() {
+ _checkSingleUse();
+
+ return new AgenticContextResponseProcessor(this);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link AgenticContextResponseProcessor}
+ */
+ public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(
+ Builder::new,
+ AgenticContextResponseProcessor::setupAgenticContextResponseProcessorDeserializer
+ );
+
+ protected static void setupAgenticContextResponseProcessorDeserializer(ObjectDeserializer op) {
+ op.add(Builder::agentStepsSummary, JsonpDeserializer.booleanDeserializer(), "agent_steps_summary");
+ op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description");
+ op.add(Builder::dslQuery, JsonpDeserializer.booleanDeserializer(), "dsl_query");
+ op.add(Builder::ignoreFailure, JsonpDeserializer.booleanDeserializer(), "ignore_failure");
+ op.add(Builder::tag, JsonpDeserializer.stringDeserializer(), "tag");
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + Objects.hashCode(this.agentStepsSummary);
+ result = 31 * result + Objects.hashCode(this.description);
+ result = 31 * result + Objects.hashCode(this.dslQuery);
+ result = 31 * result + Objects.hashCode(this.ignoreFailure);
+ result = 31 * result + Objects.hashCode(this.tag);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ AgenticContextResponseProcessor other = (AgenticContextResponseProcessor) o;
+ return Objects.equals(this.agentStepsSummary, other.agentStepsSummary)
+ && Objects.equals(this.description, other.description)
+ && Objects.equals(this.dslQuery, other.dslQuery)
+ && Objects.equals(this.ignoreFailure, other.ignoreFailure)
+ && Objects.equals(this.tag, other.tag);
+ }
+}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticQueryTranslatorRequestProcessor.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticQueryTranslatorRequestProcessor.java
new file mode 100644
index 0000000000..b90a865561
--- /dev/null
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/AgenticQueryTranslatorRequestProcessor.java
@@ -0,0 +1,306 @@
+/*
+ * SPDX-License-Identifier: Apache-2.0
+ *
+ * The OpenSearch Contributors require contributions made to
+ * this file be licensed under the Apache-2.0 license or a
+ * compatible open source license.
+ */
+
+/*
+ * Licensed to Elasticsearch B.V. under one or more contributor
+ * license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright
+ * ownership. Elasticsearch B.V. licenses this file to you under
+ * the Apache License, Version 2.0 (the "License"); you may
+ * not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+/*
+ * Modifications Copyright OpenSearch Contributors. See
+ * GitHub history for details.
+ */
+
+//----------------------------------------------------
+// THIS CODE IS GENERATED. MANUAL EDITS WILL BE LOST.
+//----------------------------------------------------
+
+package org.opensearch.client.opensearch.search_pipeline;
+
+import jakarta.json.stream.JsonGenerator;
+import java.util.Objects;
+import java.util.function.Function;
+import javax.annotation.Generated;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+import org.opensearch.client.json.JsonpDeserializable;
+import org.opensearch.client.json.JsonpDeserializer;
+import org.opensearch.client.json.JsonpMapper;
+import org.opensearch.client.json.ObjectBuilderDeserializer;
+import org.opensearch.client.json.ObjectDeserializer;
+import org.opensearch.client.json.PlainJsonSerializable;
+import org.opensearch.client.util.ApiTypeHelper;
+import org.opensearch.client.util.CopyableBuilder;
+import org.opensearch.client.util.ObjectBuilder;
+import org.opensearch.client.util.ObjectBuilderBase;
+import org.opensearch.client.util.ToCopyableBuilder;
+
+// typedef: search_pipeline.AgenticQueryTranslatorRequestProcessor
+
+@JsonpDeserializable
+@Generated("org.opensearch.client.codegen.CodeGenerator")
+public class AgenticQueryTranslatorRequestProcessor
+ implements
+ RequestProcessorVariant,
+ PlainJsonSerializable,
+ ToCopyableBuilder {
+
+ @Nonnull
+ private final String agentId;
+
+ @Nullable
+ private final String description;
+
+ @Nullable
+ private final Boolean ignoreFailure;
+
+ @Nullable
+ private final String tag;
+
+ // ---------------------------------------------------------------------------------------------
+
+ private AgenticQueryTranslatorRequestProcessor(Builder builder) {
+ this.agentId = ApiTypeHelper.requireNonNull(builder.agentId, this, "agentId");
+ this.description = builder.description;
+ this.ignoreFailure = builder.ignoreFailure;
+ this.tag = builder.tag;
+ }
+
+ public static AgenticQueryTranslatorRequestProcessor of(
+ Function> fn
+ ) {
+ return fn.apply(new Builder()).build();
+ }
+
+ /**
+ * {@link RequestProcessor} variant kind.
+ */
+ @Override
+ public RequestProcessor.Kind _requestProcessorKind() {
+ return RequestProcessor.Kind.AgenticQueryTranslator;
+ }
+
+ /**
+ * Required - The ID of the agent to use for query translation.
+ *
+ * API name: {@code agent_id}
+ *
+ */
+ @Nonnull
+ public final String agentId() {
+ return this.agentId;
+ }
+
+ /**
+ * API name: {@code description}
+ */
+ @Nullable
+ public final String description() {
+ return this.description;
+ }
+
+ /**
+ * API name: {@code ignore_failure}
+ */
+ @Nullable
+ public final Boolean ignoreFailure() {
+ return this.ignoreFailure;
+ }
+
+ /**
+ * API name: {@code tag}
+ */
+ @Nullable
+ public final String tag() {
+ return this.tag;
+ }
+
+ /**
+ * Serialize this object to JSON.
+ */
+ @Override
+ public void serialize(JsonGenerator generator, JsonpMapper mapper) {
+ generator.writeStartObject();
+ serializeInternal(generator, mapper);
+ generator.writeEnd();
+ }
+
+ protected void serializeInternal(JsonGenerator generator, JsonpMapper mapper) {
+ generator.writeKey("agent_id");
+ generator.write(this.agentId);
+
+ if (this.description != null) {
+ generator.writeKey("description");
+ generator.write(this.description);
+ }
+
+ if (this.ignoreFailure != null) {
+ generator.writeKey("ignore_failure");
+ generator.write(this.ignoreFailure);
+ }
+
+ if (this.tag != null) {
+ generator.writeKey("tag");
+ generator.write(this.tag);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ @Override
+ @Nonnull
+ public Builder toBuilder() {
+ return new Builder(this);
+ }
+
+ @Nonnull
+ public static Builder builder() {
+ return new Builder();
+ }
+
+ /**
+ * Builder for {@link AgenticQueryTranslatorRequestProcessor}.
+ */
+ public static class Builder extends ObjectBuilderBase implements CopyableBuilder {
+ private String agentId;
+ @Nullable
+ private String description;
+ @Nullable
+ private Boolean ignoreFailure;
+ @Nullable
+ private String tag;
+
+ public Builder() {}
+
+ private Builder(AgenticQueryTranslatorRequestProcessor o) {
+ this.agentId = o.agentId;
+ this.description = o.description;
+ this.ignoreFailure = o.ignoreFailure;
+ this.tag = o.tag;
+ }
+
+ private Builder(Builder o) {
+ this.agentId = o.agentId;
+ this.description = o.description;
+ this.ignoreFailure = o.ignoreFailure;
+ this.tag = o.tag;
+ }
+
+ @Override
+ @Nonnull
+ public Builder copy() {
+ return new Builder(this);
+ }
+
+ /**
+ * Required - The ID of the agent to use for query translation.
+ *
+ * API name: {@code agent_id}
+ *
+ */
+ @Nonnull
+ public final Builder agentId(String value) {
+ this.agentId = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code description}
+ */
+ @Nonnull
+ public final Builder description(@Nullable String value) {
+ this.description = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code ignore_failure}
+ */
+ @Nonnull
+ public final Builder ignoreFailure(@Nullable Boolean value) {
+ this.ignoreFailure = value;
+ return this;
+ }
+
+ /**
+ * API name: {@code tag}
+ */
+ @Nonnull
+ public final Builder tag(@Nullable String value) {
+ this.tag = value;
+ return this;
+ }
+
+ /**
+ * Builds a {@link AgenticQueryTranslatorRequestProcessor}.
+ *
+ * @throws NullPointerException if some of the required fields are null.
+ */
+ @Override
+ @Nonnull
+ public AgenticQueryTranslatorRequestProcessor build() {
+ _checkSingleUse();
+
+ return new AgenticQueryTranslatorRequestProcessor(this);
+ }
+ }
+
+ // ---------------------------------------------------------------------------------------------
+
+ /**
+ * Json deserializer for {@link AgenticQueryTranslatorRequestProcessor}
+ */
+ public static final JsonpDeserializer _DESERIALIZER = ObjectBuilderDeserializer.lazy(
+ Builder::new,
+ AgenticQueryTranslatorRequestProcessor::setupAgenticQueryTranslatorRequestProcessorDeserializer
+ );
+
+ protected static void setupAgenticQueryTranslatorRequestProcessorDeserializer(
+ ObjectDeserializer op
+ ) {
+ op.add(Builder::agentId, JsonpDeserializer.stringDeserializer(), "agent_id");
+ op.add(Builder::description, JsonpDeserializer.stringDeserializer(), "description");
+ op.add(Builder::ignoreFailure, JsonpDeserializer.booleanDeserializer(), "ignore_failure");
+ op.add(Builder::tag, JsonpDeserializer.stringDeserializer(), "tag");
+ }
+
+ @Override
+ public int hashCode() {
+ int result = 17;
+ result = 31 * result + this.agentId.hashCode();
+ result = 31 * result + Objects.hashCode(this.description);
+ result = 31 * result + Objects.hashCode(this.ignoreFailure);
+ result = 31 * result + Objects.hashCode(this.tag);
+ return result;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || this.getClass() != o.getClass()) return false;
+ AgenticQueryTranslatorRequestProcessor other = (AgenticQueryTranslatorRequestProcessor) o;
+ return this.agentId.equals(other.agentId)
+ && Objects.equals(this.description, other.description)
+ && Objects.equals(this.ignoreFailure, other.ignoreFailure)
+ && Objects.equals(this.tag, other.tag);
+ }
+}
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessor.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessor.java
index f2bca8e292..39fd740da3 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessor.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessor.java
@@ -64,6 +64,7 @@ public class RequestProcessor implements TaggedUnion agenticQueryTranslator(AgenticQueryTranslatorRequestProcessor v) {
+ this._kind = Kind.AgenticQueryTranslator;
+ this._value = v;
+ return this;
+ }
+
+ public ObjectBuilder agenticQueryTranslator(
+ Function> fn
+ ) {
+ return this.agenticQueryTranslator(fn.apply(new AgenticQueryTranslatorRequestProcessor.Builder()).build());
+ }
+
public ObjectBuilder filterQuery(FilterQueryRequestProcessor v) {
this._kind = Kind.FilterQuery;
this._value = v;
@@ -259,6 +288,7 @@ public RequestProcessor build() {
}
protected static void setupRequestProcessorDeserializer(ObjectDeserializer op) {
+ op.add(Builder::agenticQueryTranslator, AgenticQueryTranslatorRequestProcessor._DESERIALIZER, "agentic_query_translator");
op.add(Builder::filterQuery, FilterQueryRequestProcessor._DESERIALIZER, "filter_query");
op.add(Builder::neuralQueryEnricher, NeuralQueryEnricherRequestProcessor._DESERIALIZER, "neural_query_enricher");
op.add(Builder::oversample, OversampleRequestProcessor._DESERIALIZER, "oversample");
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessorBuilders.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessorBuilders.java
index 81d157b04a..282c0c7ea6 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessorBuilders.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/RequestProcessorBuilders.java
@@ -45,6 +45,13 @@
public class RequestProcessorBuilders {
private RequestProcessorBuilders() {}
+ /**
+ * Creates a builder for the {@link AgenticQueryTranslatorRequestProcessor agentic_query_translator} {@code RequestProcessor} variant.
+ */
+ public static AgenticQueryTranslatorRequestProcessor.Builder agenticQueryTranslator() {
+ return new AgenticQueryTranslatorRequestProcessor.Builder();
+ }
+
/**
* Creates a builder for the {@link FilterQueryRequestProcessor filter_query} {@code RequestProcessor} variant.
*/
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessor.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessor.java
index b780af7028..37aa18aa3d 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessor.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessor.java
@@ -64,6 +64,7 @@ public class ResponseProcessor implements TaggedUnion agenticContext(AgenticContextResponseProcessor v) {
+ this._kind = Kind.AgenticContext;
+ this._value = v;
+ return this;
+ }
+
+ public ObjectBuilder agenticContext(
+ Function> fn
+ ) {
+ return this.agenticContext(fn.apply(new AgenticContextResponseProcessor.Builder()).build());
+ }
+
public ObjectBuilder collapse(CollapseResponseProcessor v) {
this._kind = Kind.Collapse;
this._value = v;
@@ -371,6 +400,7 @@ public ResponseProcessor build() {
}
protected static void setupResponseProcessorDeserializer(ObjectDeserializer op) {
+ op.add(Builder::agenticContext, AgenticContextResponseProcessor._DESERIALIZER, "agentic_context");
op.add(Builder::collapse, CollapseResponseProcessor._DESERIALIZER, "collapse");
op.add(Builder::personalizeSearchRanking, PersonalizeSearchRankingResponseProcessor._DESERIALIZER, "personalize_search_ranking");
op.add(Builder::renameField, RenameFieldResponseProcessor._DESERIALIZER, "rename_field");
diff --git a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessorBuilders.java b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessorBuilders.java
index 4ce4ed3a6e..4f56eafaeb 100644
--- a/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessorBuilders.java
+++ b/java-client/src/generated/java/org/opensearch/client/opensearch/search_pipeline/ResponseProcessorBuilders.java
@@ -45,6 +45,13 @@
public class ResponseProcessorBuilders {
private ResponseProcessorBuilders() {}
+ /**
+ * Creates a builder for the {@link AgenticContextResponseProcessor agentic_context} {@code ResponseProcessor} variant.
+ */
+ public static AgenticContextResponseProcessor.Builder agenticContext() {
+ return new AgenticContextResponseProcessor.Builder();
+ }
+
/**
* Creates a builder for the {@link CollapseResponseProcessor collapse} {@code ResponseProcessor} variant.
*/
diff --git a/java-codegen/opensearch-openapi.yaml b/java-codegen/opensearch-openapi.yaml
index 4352ebbf76..00d36f4260 100644
--- a/java-codegen/opensearch-openapi.yaml
+++ b/java-codegen/opensearch-openapi.yaml
@@ -30441,7 +30441,7 @@ components:
- $ref: '#/components/schemas/_core.bulk___UpdateAction'
- type: object
additionalProperties: true
- x-protobuf-type: bytes
+ x-protobuf-data-type: bytes
title: object
description: The operation definition and data (action-data pairs), separated by newlines
required: true
@@ -31339,6 +31339,7 @@ components:
application/json:
schema:
type: object
+ title: MLExecuteAgentStreamRequestBody
properties:
parameters:
$ref: '#/components/schemas/ml._common___Parameters'
@@ -31458,6 +31459,7 @@ components:
application/json:
schema:
type: object
+ title: MLPredictModelStreamRequestBody
properties:
parameters:
$ref: '#/components/schemas/ml._common___Parameters'
@@ -32220,6 +32222,7 @@ components:
aggs:
description: Defines the aggregations that are run as part of the search request.
type: object
+ x-protobuf-excluded: true
additionalProperties:
$ref: '#/components/schemas/_common.aggregations___AggregationContainer'
collapse:
@@ -38979,7 +38982,7 @@ components:
$ref: '#/components/schemas/_common___Routing'
_source:
type: object
- x-protobuf-type: bytes
+ x-protobuf-data-type: bytes
description: The source of the document.
additionalProperties: true
additionalProperties:
@@ -40433,13 +40436,13 @@ components:
oneOf:
- type: boolean
- type: string
- x-protobuf-type: bool
+ x-protobuf-data-type: bool
_common___StringifiedDouble:
oneOf:
- type: number
format: double
- type: string
- x-protobuf-type: double
+ x-protobuf-data-type: double
_common___StringifiedEpochTimeUnitMillis:
description: |-
Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
@@ -40471,13 +40474,13 @@ components:
- type: integer
- type: string
pattern: ^[+-]?\d+$
- x-protobuf-type: int32
+ x-protobuf-data-type: int32
_common___StringifiedLong:
oneOf:
- type: integer
format: int64
- type: string
- x-protobuf-type: int64
+ x-protobuf-data-type: int64
_common___StringifiedVersionNumber:
description: |-
Certain APIs may return values, including numbers such as epoch timestamps, as strings. This setting captures
@@ -44034,6 +44037,7 @@ components:
doc_count_error:
type: integer
format: int64
+ description: Upper bound of the document count error. Only present when `show_term_doc_count_error` is true.
_common.aggregations___TermsExclude:
oneOf:
- title: regexp
@@ -47435,6 +47439,25 @@ components:
- xy_shape
required:
- type
+ _common.query_dsl___AgenticQuery:
+ x-version-added: '3.2'
+ allOf:
+ - $ref: '#/components/schemas/_common.query_dsl___QueryBase'
+ - type: object
+ properties:
+ query_text:
+ description: The natural language question to be answered by the agent.
+ type: string
+ query_fields:
+ description: A list of index fields that the agent should consider when generating the search query.
+ type: array
+ items:
+ $ref: '#/components/schemas/_common___Field'
+ memory_id:
+ description: The memory ID from a previous response, used to continue a conversation with prior context. Applicable for conversational agents only.
+ type: string
+ required:
+ - query_text
_common.query_dsl___BoolQuery:
allOf:
- $ref: '#/components/schemas/_common.query_dsl___QueryBase'
@@ -48764,6 +48787,8 @@ components:
_common.query_dsl___QueryContainer:
type: object
properties:
+ agentic:
+ $ref: '#/components/schemas/_common.query_dsl___AgenticQuery'
bool:
$ref: '#/components/schemas/_common.query_dsl___BoolQuery'
boosting:
@@ -49802,7 +49827,7 @@ components:
doc:
description: A partial update to an existing document.
type: object
- x-protobuf-type: bytes
+ x-protobuf-data-type: bytes
doc_as_upsert:
description: When `true`, uses the contents of `doc` as the value of `upsert`.
type: boolean
@@ -49825,7 +49850,7 @@ components:
If the document does not already exist, the contents of `upsert` are inserted as a
new document. If the document exists, the `script` is executed.
type: object
- x-protobuf-type: bytes
+ x-protobuf-data-type: bytes
_core.bulk___UpdateOperation:
allOf:
- $ref: '#/components/schemas/_core.bulk___OperationBase'
@@ -51978,7 +52003,7 @@ components:
- score
_core.search___TDocument:
x-is-generic-type-parameter: true
- x-protobuf-type: bytes
+ x-protobuf-data-type: bytes
_core.search___TermSuggest:
allOf:
- $ref: '#/components/schemas/_core.search___SuggestBase'
@@ -61885,6 +61910,14 @@ components:
enum:
- aws_sigv4
- http
+ ml._common___Content:
+ type: object
+ properties:
+ text:
+ type: string
+ type:
+ type: string
+ additionalProperties: true
ml._common___Credential:
type: object
properties:
@@ -62301,6 +62334,25 @@ components:
type: integer
format: int64
description: The trace number.
+ role:
+ type: string
+ description: The role of the message.
+ content:
+ type: array
+ items:
+ $ref: '#/components/schemas/ml._common___Content'
+ ml._common___Messages:
+ type: object
+ properties:
+ role:
+ type: string
+ description: The role of the message.
+ content:
+ type: string
+ description: The content of the message.
+ ml._common___Metadata:
+ type: object
+ additionalProperties: true
ml._common___MlIndexStatus:
type: string
enum:
@@ -62644,6 +62696,17 @@ components:
- name
ml._common___Parameters:
type: object
+ properties:
+ messages:
+ type: array
+ items:
+ $ref: '#/components/schemas/ml._common___Messages'
+ inputs:
+ type: string
+ _llm_interface:
+ type: string
+ question:
+ type: string
additionalProperties: true
ml._common___PredictionResult:
type: object
@@ -67400,6 +67463,39 @@ components:
target_field:
type: string
description: The field name to use in the target index for the terms aggregation results.
+ search_pipeline._common___AgenticContextResponseProcessor:
+ x-version-added: '3.3'
+ type: object
+ properties:
+ tag:
+ type: string
+ description:
+ type: string
+ ignore_failure:
+ type: boolean
+ agent_steps_summary:
+ description: Whether to include the agent's execution step summary in the response. Available for conversational agents only.
+ type: boolean
+ default: false
+ dsl_query:
+ description: Whether to include the generated DSL query in the response. Available for both conversational and flow agents.
+ type: boolean
+ default: false
+ search_pipeline._common___AgenticQueryTranslatorRequestProcessor:
+ x-version-added: '3.2'
+ type: object
+ properties:
+ tag:
+ type: string
+ description:
+ type: string
+ ignore_failure:
+ type: boolean
+ agent_id:
+ description: The ID of the agent to use for query translation.
+ type: string
+ required:
+ - agent_id
search_pipeline._common___CollapseResponseProcessor:
type: object
properties:
@@ -67535,6 +67631,14 @@ components:
- target_field
search_pipeline._common___RequestProcessor:
oneOf:
+ - x-version-added: '3.2'
+ type: object
+ title: agentic_query_translator
+ properties:
+ agentic_query_translator:
+ $ref: '#/components/schemas/search_pipeline._common___AgenticQueryTranslatorRequestProcessor'
+ required:
+ - agentic_query_translator
- type: object
title: filter_query
properties:
@@ -67587,6 +67691,14 @@ components:
$ref: '#/components/schemas/search_pipeline._common___RerankContext'
search_pipeline._common___ResponseProcessor:
oneOf:
+ - x-version-added: '3.3'
+ type: object
+ title: agentic_context
+ properties:
+ agentic_context:
+ $ref: '#/components/schemas/search_pipeline._common___AgenticContextResponseProcessor'
+ required:
+ - agentic_context
- type: object
title: personalize_search_ranking
properties: