Package com.longbridge.agent
Class ConversationResponse
- java.lang.Object
-
- com.longbridge.agent.ConversationResponse
-
public class ConversationResponse extends Object
Response forAgentContext.conversation(java.lang.String, java.lang.String, java.lang.String),AgentContext.continueConversation(java.lang.String, java.lang.String, java.lang.String, java.util.Map<java.lang.String, java.util.Map<java.lang.String, java.lang.String>>), and the final result of the streamed counterparts (delivered asWorkflowFinishedEvent.getResponse()).
-
-
Constructor Summary
Constructors Constructor Description ConversationResponse()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAnswer()Returns the final answer text; valid whengetStatus()isConversationStatus.Succeeded.StringgetChatUid()Returns the conversation identifier, used for follow-up questions and troubleshooting.doublegetElapsedTime()Returns the run duration in seconds.ConversationErrorgetError()Returns the error details; present only when the run failed.InterruptgetInterrupt()Returns the interrupt details; present only whengetStatus()isConversationStatus.Interrupted.StringgetMessageId()Returns the message ID of this round.Reference[]getReferences()Returns the sources referenced by the answer.ConversationStatusgetStatus()Returns the final run status.StringtoString()
-
-
-
Method Detail
-
getChatUid
public String getChatUid()
Returns the conversation identifier, used for follow-up questions and troubleshooting.- Returns:
- conversation identifier
-
getMessageId
public String getMessageId()
Returns the message ID of this round.- Returns:
- message ID
-
getStatus
public ConversationStatus getStatus()
Returns the final run status.- Returns:
- final run status
-
getAnswer
public String getAnswer()
Returns the final answer text; valid whengetStatus()isConversationStatus.Succeeded.- Returns:
- final answer text
-
getReferences
public Reference[] getReferences()
Returns the sources referenced by the answer.- Returns:
- referenced sources
-
getElapsedTime
public double getElapsedTime()
Returns the run duration in seconds.- Returns:
- run duration in seconds
-
getInterrupt
public Interrupt getInterrupt()
Returns the interrupt details; present only whengetStatus()isConversationStatus.Interrupted.- Returns:
- interrupt details, or
null
-
getError
public ConversationError getError()
Returns the error details; present only when the run failed.- Returns:
- error details, or
null
-
-