Package org.opensearch.ml.common.agent
Class MLAgent
java.lang.Object
org.opensearch.ml.common.agent.MLAgent
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentObject
public class MLAgent
extends Object
implements org.opensearch.core.xcontent.ToXContentObject, org.opensearch.core.common.io.stream.Writeable
-
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.ParamsNested classes/interfaces inherited from interface org.opensearch.core.common.io.stream.Writeable
org.opensearch.core.common.io.stream.Writeable.Reader<V>, org.opensearch.core.common.io.stream.Writeable.WriteableRegistry, org.opensearch.core.common.io.stream.Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionMLAgent(String name, String type, String description, LLMSpec llm, List<MLToolSpec> tools, Map<String, String> parameters, MLMemorySpec memory, Instant createdTime, Instant lastUpdateTime, String appType, Boolean isHidden) MLAgent(org.opensearch.core.common.io.stream.StreamInput input) -
Method Summary
Modifier and TypeMethodDescriptionstatic MLAgent.MLAgentBuilderbuilder()protected booleanbooleanstatic MLAgentfromStream(org.opensearch.core.common.io.stream.StreamInput in) getLlm()getName()getTools()getType()inthashCode()static MLAgentparse(org.opensearch.core.xcontent.XContentParser parser) static MLAgentparseFromUserInput(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
-
AGENT_NAME_FIELD
- See Also:
-
AGENT_TYPE_FIELD
- See Also:
-
DESCRIPTION_FIELD
- See Also:
-
LLM_FIELD
- See Also:
-
TOOLS_FIELD
- See Also:
-
PARAMETERS_FIELD
- See Also:
-
MEMORY_FIELD
- See Also:
-
MEMORY_ID_FIELD
- See Also:
-
CREATED_TIME_FIELD
- See Also:
-
LAST_UPDATED_TIME_FIELD
- See Also:
-
APP_TYPE_FIELD
- See Also:
-
IS_HIDDEN_FIELD
- See Also:
-
-
Constructor Details
-
MLAgent
-
MLAgent
- Throws:
IOException
-
-
Method Details
-
writeTo
- Specified by:
writeToin interfaceorg.opensearch.core.common.io.stream.Writeable- 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
- Throws:
IOException
-
parseFromUserInput
public static MLAgent parseFromUserInput(org.opensearch.core.xcontent.XContentParser parser) throws IOException - Throws:
IOException
-
fromStream
public static MLAgent fromStream(org.opensearch.core.common.io.stream.StreamInput in) throws IOException - Throws:
IOException
-
builder
-
toBuilder
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getName
-
getType
-
getDescription
-
getLlm
-
getTools
-
getParameters
-
getMemory
-
getCreatedTime
-
getLastUpdateTime
-
getAppType
-
getIsHidden
-