@Generated(value="com.amazonaws:aws-java-sdk-code-generator") public class RetrieveAndGenerateResult extends AmazonWebServiceResult<ResponseMetadata> implements Serializable, Cloneable
Constructor and Description |
---|
RetrieveAndGenerateResult() |
Modifier and Type | Method and Description |
---|---|
RetrieveAndGenerateResult |
clone() |
boolean |
equals(Object obj) |
List<Citation> |
getCitations()
A list of segments of the generated response that are based on sources in the knowledge base, alongside
information about the sources.
|
String |
getGuardrailAction()
Specifies if there is a guardrail intervention in the response.
|
RetrieveAndGenerateOutput |
getOutput()
Contains the response generated from querying the knowledge base.
|
String |
getSessionId()
The unique identifier of the session.
|
int |
hashCode() |
void |
setCitations(Collection<Citation> citations)
A list of segments of the generated response that are based on sources in the knowledge base, alongside
information about the sources.
|
void |
setGuardrailAction(String guardrailAction)
Specifies if there is a guardrail intervention in the response.
|
void |
setOutput(RetrieveAndGenerateOutput output)
Contains the response generated from querying the knowledge base.
|
void |
setSessionId(String sessionId)
The unique identifier of the session.
|
String |
toString()
Returns a string representation of this object.
|
RetrieveAndGenerateResult |
withCitations(Citation... citations)
A list of segments of the generated response that are based on sources in the knowledge base, alongside
information about the sources.
|
RetrieveAndGenerateResult |
withCitations(Collection<Citation> citations)
A list of segments of the generated response that are based on sources in the knowledge base, alongside
information about the sources.
|
RetrieveAndGenerateResult |
withGuardrailAction(GuadrailAction guardrailAction)
Specifies if there is a guardrail intervention in the response.
|
RetrieveAndGenerateResult |
withGuardrailAction(String guardrailAction)
Specifies if there is a guardrail intervention in the response.
|
RetrieveAndGenerateResult |
withOutput(RetrieveAndGenerateOutput output)
Contains the response generated from querying the knowledge base.
|
RetrieveAndGenerateResult |
withSessionId(String sessionId)
The unique identifier of the session.
|
getSdkHttpMetadata, getSdkResponseMetadata, setSdkHttpMetadata, setSdkResponseMetadata
public List<Citation> getCitations()
A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.
public void setCitations(Collection<Citation> citations)
A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.
citations
- A list of segments of the generated response that are based on sources in the knowledge base, alongside
information about the sources.public RetrieveAndGenerateResult withCitations(Citation... citations)
A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.
NOTE: This method appends the values to the existing list (if any). Use
setCitations(java.util.Collection)
or withCitations(java.util.Collection)
if you want to
override the existing values.
citations
- A list of segments of the generated response that are based on sources in the knowledge base, alongside
information about the sources.public RetrieveAndGenerateResult withCitations(Collection<Citation> citations)
A list of segments of the generated response that are based on sources in the knowledge base, alongside information about the sources.
citations
- A list of segments of the generated response that are based on sources in the knowledge base, alongside
information about the sources.public void setGuardrailAction(String guardrailAction)
Specifies if there is a guardrail intervention in the response.
guardrailAction
- Specifies if there is a guardrail intervention in the response.GuadrailAction
public String getGuardrailAction()
Specifies if there is a guardrail intervention in the response.
GuadrailAction
public RetrieveAndGenerateResult withGuardrailAction(String guardrailAction)
Specifies if there is a guardrail intervention in the response.
guardrailAction
- Specifies if there is a guardrail intervention in the response.GuadrailAction
public RetrieveAndGenerateResult withGuardrailAction(GuadrailAction guardrailAction)
Specifies if there is a guardrail intervention in the response.
guardrailAction
- Specifies if there is a guardrail intervention in the response.GuadrailAction
public void setOutput(RetrieveAndGenerateOutput output)
Contains the response generated from querying the knowledge base.
output
- Contains the response generated from querying the knowledge base.public RetrieveAndGenerateOutput getOutput()
Contains the response generated from querying the knowledge base.
public RetrieveAndGenerateResult withOutput(RetrieveAndGenerateOutput output)
Contains the response generated from querying the knowledge base.
output
- Contains the response generated from querying the knowledge base.public void setSessionId(String sessionId)
The unique identifier of the session. When you first make a RetrieveAndGenerate
request, Amazon
Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same
conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous
interactions. You can't explicitly set the sessionId
yourself.
sessionId
- The unique identifier of the session. When you first make a RetrieveAndGenerate
request,
Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests
in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge
from previous interactions. You can't explicitly set the sessionId
yourself.public String getSessionId()
The unique identifier of the session. When you first make a RetrieveAndGenerate
request, Amazon
Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same
conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous
interactions. You can't explicitly set the sessionId
yourself.
RetrieveAndGenerate
request,
Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests
in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge
from previous interactions. You can't explicitly set the sessionId
yourself.public RetrieveAndGenerateResult withSessionId(String sessionId)
The unique identifier of the session. When you first make a RetrieveAndGenerate
request, Amazon
Bedrock automatically generates this value. You must reuse this value for all subsequent requests in the same
conversational session. This value allows Amazon Bedrock to maintain context and knowledge from previous
interactions. You can't explicitly set the sessionId
yourself.
sessionId
- The unique identifier of the session. When you first make a RetrieveAndGenerate
request,
Amazon Bedrock automatically generates this value. You must reuse this value for all subsequent requests
in the same conversational session. This value allows Amazon Bedrock to maintain context and knowledge
from previous interactions. You can't explicitly set the sessionId
yourself.public String toString()
toString
in class Object
Object.toString()
public RetrieveAndGenerateResult clone()