Class ConversationMeta
java.lang.Object
org.opensearch.ml.common.conversation.ConversationMeta
- All Implemented Interfaces:
org.opensearch.core.common.io.stream.Writeable,org.opensearch.core.xcontent.ToXContent,org.opensearch.core.xcontent.ToXContentObject
public class ConversationMeta
extends Object
implements org.opensearch.core.common.io.stream.Writeable, org.opensearch.core.xcontent.ToXContentObject
Class for holding conversational metadata
-
Nested Class Summary
Nested 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
Fields inherited from interface org.opensearch.core.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic ConversationMetaCreates a conversationMeta object from a Map of fields in the OS indexstatic ConversationMetafromSearchHit(org.opensearch.search.SearchHit hit) Creates a conversationMeta object from a SearchHit objectstatic ConversationMetafromStream(org.opensearch.core.common.io.stream.StreamInput in) Creates a conversationMeta from a stream, given the stream was written to by conversationMeta.writeTogetId()getName()getUser()toString()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, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.opensearch.core.xcontent.ToXContentObject
isFragment
-
Constructor Details
-
ConversationMeta
-
-
Method Details
-
fromSearchHit
Creates a conversationMeta object from a SearchHit object- Parameters:
hit- the search hit to transform into a conversationMeta object- Returns:
- a new conversationMeta object representing the search hit
-
fromMap
Creates a conversationMeta object from a Map of fields in the OS index- Parameters:
id- the conversation's iddocFields- the map of source fields- Returns:
- a new conversationMeta object representing the map
-
fromStream
public static ConversationMeta fromStream(org.opensearch.core.common.io.stream.StreamInput in) throws IOException Creates a conversationMeta from a stream, given the stream was written to by conversationMeta.writeTo- Parameters:
in- stream to read from- Returns:
- new conversationMeta object
- Throws:
IOException- if you're reading from a stream without a conversationMeta in it
-
writeTo
- Specified by:
writeToin interfaceorg.opensearch.core.common.io.stream.Writeable- Throws:
IOException
-
toString
-
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
-
equals
-
getId
-
getCreatedTime
-
getUpdatedTime
-
getName
-
getUser
-