Package org.opensearch.ml.common.agent
Class MLToolSpec
java.lang.Object
org.opensearch.ml.common.agent.MLToolSpec
- All Implemented Interfaces:
org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentObject
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.opensearch.core.xcontent.ToXContent
org.opensearch.core.xcontent.ToXContent.DelegatingMapParams, org.opensearch.core.xcontent.ToXContent.MapParams, org.opensearch.core.xcontent.ToXContent.Params -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionMLToolSpec(String type, String name, String description, Map<String, String> parameters, boolean includeOutputInAgentResponse) MLToolSpec(org.opensearch.core.common.io.stream.StreamInput input) -
Method Summary
Modifier and TypeMethodDescriptionstatic MLToolSpec.MLToolSpecBuilderbuilder()protected booleanbooleanstatic MLToolSpecfromStream(org.opensearch.core.common.io.stream.StreamInput in) getName()getType()inthashCode()booleanstatic MLToolSpecparse(org.opensearch.core.xcontent.XContentParser parser) org.opensearch.core.xcontent.XContentBuildertoXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) voidwriteTo(org.opensearch.core.common.io.stream.StreamOutput out) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Field Details
-
TOOL_TYPE_FIELD
- See Also:
-
TOOL_NAME_FIELD
- See Also:
-
DESCRIPTION_FIELD
- See Also:
-
PARAMETERS_FIELD
- See Also:
-
INCLUDE_OUTPUT_IN_AGENT_RESPONSE
- See Also:
-
-
Constructor Details
-
MLToolSpec
-
MLToolSpec
- Throws:
IOException
-
-
Method Details
-
writeTo
- Throws:
IOException
-
toXContent
public org.opensearch.core.xcontent.XContentBuilder toXContent(org.opensearch.core.xcontent.XContentBuilder builder, org.opensearch.core.xcontent.ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceorg.opensearch.core.xcontent.ToXContent- Throws:
IOException
-
parse
public static MLToolSpec parse(org.opensearch.core.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
fromStream
public static MLToolSpec fromStream(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
builder
-
toBuilder
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getType
-
getName
-
getDescription
-
getParameters
-
isIncludeOutputInAgentResponse
public boolean isIncludeOutputInAgentResponse()
-