From 05e69dacac95fee8e0cdc6b2b6c99f23dc854f5f Mon Sep 17 00:00:00 2001 From: awstools Date: Tue, 26 Mar 2024 18:22:15 +0000 Subject: [PATCH] feat(client-bedrock-agent-runtime): This release adds support to customize prompts sent through the RetrieveAndGenerate API in Agents for Amazon Bedrock. --- .../commands/RetrieveAndGenerateCommand.ts | 8 +- .../src/models/models_0.ts | 299 ++++++++++++++++-- .../src/protocols/Aws_restJson1.ts | 6 + .../aws-models/bedrock-agent-runtime.json | 98 ++++-- 4 files changed, 363 insertions(+), 48 deletions(-) diff --git a/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateCommand.ts b/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateCommand.ts index a614294692f75..3c0e527bd661a 100644 --- a/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateCommand.ts +++ b/clients/client-bedrock-agent-runtime/src/commands/RetrieveAndGenerateCommand.ts @@ -37,9 +37,6 @@ export interface RetrieveAndGenerateCommandOutput extends RetrieveAndGenerateRes /** *

Queries a knowledge base and generates responses based on the retrieved results. The response cites up to five sources but only selects the ones that are relevant to the query.

- * - *

The numberOfResults field is currently unsupported for RetrieveAndGenerate. Don't include it in the vectorSearchConfiguration object.

- *
* @example * Use a bare-bones client and the command you need to make an API call. * ```javascript @@ -62,6 +59,11 @@ export interface RetrieveAndGenerateCommandOutput extends RetrieveAndGenerateRes * overrideSearchType: "HYBRID" || "SEMANTIC", * }, * }, + * generationConfiguration: { // GenerationConfiguration + * promptTemplate: { // PromptTemplate + * textPromptTemplate: "STRING_VALUE", + * }, + * }, * }, * }, * sessionConfiguration: { // RetrieveAndGenerateSessionConfiguration diff --git a/clients/client-bedrock-agent-runtime/src/models/models_0.ts b/clients/client-bedrock-agent-runtime/src/models/models_0.ts index 9c15f90a6dc20..3073bbadf4dcc 100644 --- a/clients/client-bedrock-agent-runtime/src/models/models_0.ts +++ b/clients/client-bedrock-agent-runtime/src/models/models_0.ts @@ -202,7 +202,7 @@ export class InternalServerException extends __BaseException { } /** - *

Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a Lambda function for an action group or pass them when making an InvokeAgent request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see Session context.

+ *

Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a Lambda function for an action group or pass them when making an InvokeAgent request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see Control session context.

* @public */ export interface SessionState { @@ -224,7 +224,7 @@ export interface SessionState { */ export interface InvokeAgentRequest { /** - *

Contains parameters that specify various attributes of the session.

+ *

Contains parameters that specify various attributes of the session. For more information, see Control session context.

* @public */ sessionState?: SessionState; @@ -268,6 +268,17 @@ export interface InvokeAgentRequest { /** *

Contains information about where the text with a citation begins and ends in the generated output.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface Span { @@ -286,6 +297,17 @@ export interface Span { /** *

Contains the part of the generated text that contains a citation, alongside where it begins and ends.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface TextResponsePart { @@ -304,6 +326,17 @@ export interface TextResponsePart { /** *

Contains metadata about a part of the generated response that is accompanied by a citation.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface GeneratedResponsePart { @@ -316,6 +349,21 @@ export interface GeneratedResponsePart { /** *

Contains the cited text from the data source.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface RetrievalResultContent { @@ -328,6 +376,21 @@ export interface RetrievalResultContent { /** *

Contains the S3 location of the data source.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface RetrievalResultS3Location { @@ -354,6 +417,21 @@ export type RetrievalResultLocationType = /** *

Contains information about the location of the data source.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface RetrievalResultLocation { @@ -371,7 +449,18 @@ export interface RetrievalResultLocation { } /** - *

Contains metadata about a sources cited for the generated response.

+ *

Contains metadata about a source cited for the generated response.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface RetrievedReference { @@ -390,6 +479,17 @@ export interface RetrievedReference { /** *

An object containing a segment of the generated response that is based on a source in the knowledge base, alongside information about the source.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface Citation { @@ -1608,6 +1708,13 @@ export interface InvokeAgentResponse { /** *

Contains the query made to the knowledge base.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface RetrieveAndGenerateInput { @@ -1618,6 +1725,59 @@ export interface RetrieveAndGenerateInput { text: string | undefined; } +/** + *

Contains the template for the prompt that's sent to the model for response generation. For more information, see Knowledge base prompt templates.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface PromptTemplate { + /** + *

The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template.

+ *

For more information, see the following resources:

+ * + * @public + */ + textPromptTemplate?: string; +} + +/** + *

Contains configurations for response generation based on the knowledge base query results.

+ *

This data type is used in the following API operations:

+ * + * @public + */ +export interface GenerationConfiguration { + /** + *

Contains the template for the prompt that's sent to the model for response generation.

+ * @public + */ + promptTemplate?: PromptTemplate; +} + /** * @public * @enum @@ -1633,15 +1793,23 @@ export const SearchType = { export type SearchType = (typeof SearchType)[keyof typeof SearchType]; /** - *

Configurations for how to carry out the search.

+ *

Configurations for how to perform the search query and return results. For more information, see Query configurations.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface KnowledgeBaseVectorSearchConfiguration { /** - *

The number of results to return.

- * - *

The numberOfResults field is currently unsupported for RetrieveAndGenerate. Don't include it in this field if you are sending a RetrieveAndGenerate request.

- *
+ *

The number of source chunks to retrieve.

* @public */ numberOfResults?: number; @@ -1654,25 +1822,23 @@ export interface KnowledgeBaseVectorSearchConfiguration { } /** - *

Contains details about how the results should be returned.

+ *

Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.

*

This data type is used in the following API operations:

* * @public */ export interface KnowledgeBaseRetrievalConfiguration { /** - *

Contains details about how the results from the vector search should be returned.

+ *

Contains details about how the results from the vector search should be returned. For more information, see Query configurations.

* @public */ vectorSearchConfiguration: KnowledgeBaseVectorSearchConfiguration | undefined; @@ -1680,6 +1846,17 @@ export interface KnowledgeBaseRetrievalConfiguration { /** *

Contains details about the resource being queried.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface KnowledgeBaseRetrieveAndGenerateConfiguration { @@ -1700,6 +1877,12 @@ export interface KnowledgeBaseRetrieveAndGenerateConfiguration { * @public */ retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration; + + /** + *

Contains configurations for response generation based on the knowwledge base query results.

+ * @public + */ + generationConfiguration?: GenerationConfiguration; } /** @@ -1717,6 +1900,13 @@ export type RetrieveAndGenerateType = (typeof RetrieveAndGenerateType)[keyof typ /** *

Contains details about the resource being queried.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface RetrieveAndGenerateConfiguration { @@ -1735,6 +1925,13 @@ export interface RetrieveAndGenerateConfiguration { /** *

Contains configuration about the session with the knowledge base.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface RetrieveAndGenerateSessionConfiguration { @@ -1756,13 +1953,13 @@ export interface RetrieveAndGenerateRequest { sessionId?: string; /** - *

Contains the query made to the knowledge base.

+ *

Contains the query to be made to the knowledge base.

* @public */ input: RetrieveAndGenerateInput | undefined; /** - *

Contains details about the resource being queried and the foundation model used for generation.

+ *

Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.

* @public */ retrieveAndGenerateConfiguration?: RetrieveAndGenerateConfiguration; @@ -1776,6 +1973,13 @@ export interface RetrieveAndGenerateRequest { /** *

Contains the response generated from querying the knowledge base.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface RetrieveAndGenerateOutput { @@ -1811,6 +2015,13 @@ export interface RetrieveAndGenerateResponse { /** *

Contains the query made to the knowledge base.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface KnowledgeBaseQuery { @@ -1832,13 +2043,13 @@ export interface RetrieveRequest { knowledgeBaseId: string | undefined; /** - *

The query to send the knowledge base.

+ *

Contains the query to send the knowledge base.

* @public */ retrievalQuery: KnowledgeBaseQuery | undefined; /** - *

Contains details about how the results should be returned.

+ *

Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.

* @public */ retrievalConfiguration?: KnowledgeBaseRetrievalConfiguration; @@ -1852,6 +2063,13 @@ export interface RetrieveRequest { /** *

Details about a result from querying the knowledge base.

+ *

This data type is used in the following API operations:

+ * * @public */ export interface KnowledgeBaseRetrievalResult { @@ -2188,12 +2406,57 @@ export const RetrieveAndGenerateInputFilterSensitiveLog = (obj: RetrieveAndGener ...obj, }); +/** + * @internal + */ +export const PromptTemplateFilterSensitiveLog = (obj: PromptTemplate): any => ({ + ...obj, + ...(obj.textPromptTemplate && { textPromptTemplate: SENSITIVE_STRING }), +}); + +/** + * @internal + */ +export const GenerationConfigurationFilterSensitiveLog = (obj: GenerationConfiguration): any => ({ + ...obj, + ...(obj.promptTemplate && { promptTemplate: PromptTemplateFilterSensitiveLog(obj.promptTemplate) }), +}); + +/** + * @internal + */ +export const KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog = ( + obj: KnowledgeBaseRetrieveAndGenerateConfiguration +): any => ({ + ...obj, + ...(obj.generationConfiguration && { + generationConfiguration: GenerationConfigurationFilterSensitiveLog(obj.generationConfiguration), + }), +}); + +/** + * @internal + */ +export const RetrieveAndGenerateConfigurationFilterSensitiveLog = (obj: RetrieveAndGenerateConfiguration): any => ({ + ...obj, + ...(obj.knowledgeBaseConfiguration && { + knowledgeBaseConfiguration: KnowledgeBaseRetrieveAndGenerateConfigurationFilterSensitiveLog( + obj.knowledgeBaseConfiguration + ), + }), +}); + /** * @internal */ export const RetrieveAndGenerateRequestFilterSensitiveLog = (obj: RetrieveAndGenerateRequest): any => ({ ...obj, ...(obj.input && { input: SENSITIVE_STRING }), + ...(obj.retrieveAndGenerateConfiguration && { + retrieveAndGenerateConfiguration: RetrieveAndGenerateConfigurationFilterSensitiveLog( + obj.retrieveAndGenerateConfiguration + ), + }), }); /** diff --git a/clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts b/clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts index d5d11b3179169..060f966fe69ce 100644 --- a/clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts +++ b/clients/client-bedrock-agent-runtime/src/protocols/Aws_restJson1.ts @@ -41,6 +41,7 @@ import { BadGatewayException, ConflictException, DependencyFailedException, + GenerationConfiguration, InferenceConfiguration, InternalServerException, KnowledgeBaseQuery, @@ -53,6 +54,7 @@ import { PayloadPart, PostProcessingTrace, PreProcessingTrace, + PromptTemplate, ResourceNotFoundException, ResponseStream, RetrieveAndGenerateConfiguration, @@ -589,6 +591,8 @@ const de_ValidationException_event = async (output: any, context: __SerdeContext }; return de_ValidationExceptionRes(parsedOutput, context); }; +// se_GenerationConfiguration omitted. + // se_KnowledgeBaseQuery omitted. // se_KnowledgeBaseRetrievalConfiguration omitted. @@ -599,6 +603,8 @@ const de_ValidationException_event = async (output: any, context: __SerdeContext // se_PromptSessionAttributesMap omitted. +// se_PromptTemplate omitted. + // se_RetrieveAndGenerateConfiguration omitted. // se_RetrieveAndGenerateInput omitted. diff --git a/codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json b/codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json index b2c759b95664c..1f7f571084ec6 100644 --- a/codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json +++ b/codegen/sdk-codegen/aws-models/bedrock-agent-runtime.json @@ -855,7 +855,7 @@ } }, "traits": { - "smithy.api#documentation": "

An object containing a segment of the generated response that is based on a source in the knowledge base, alongside information about the source.

" + "smithy.api#documentation": "

An object containing a segment of the generated response that is based on a source in the knowledge base, alongside information about the source.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#Citations": { @@ -980,7 +980,21 @@ } }, "traits": { - "smithy.api#documentation": "

Contains metadata about a part of the generated response that is accompanied by a citation.

" + "smithy.api#documentation": "

Contains metadata about a part of the generated response that is accompanied by a citation.

\n

This data type is used in the following API operations:

\n " + } + }, + "com.amazonaws.bedrockagentruntime#GenerationConfiguration": { + "type": "structure", + "members": { + "promptTemplate": { + "target": "com.amazonaws.bedrockagentruntime#PromptTemplate", + "traits": { + "smithy.api#documentation": "

Contains the template for the prompt that's sent to the model for response generation.

" + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains configurations for response generation based on the knowledge base query results.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#InferenceConfiguration": { @@ -1159,7 +1173,7 @@ "sessionState": { "target": "com.amazonaws.bedrockagentruntime#SessionState", "traits": { - "smithy.api#documentation": "

Contains parameters that specify various attributes of the session.

" + "smithy.api#documentation": "

Contains parameters that specify various attributes of the session. For more information, see Control session context.

" } }, "agentId": { @@ -1316,7 +1330,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the query made to the knowledge base.

", + "smithy.api#documentation": "

Contains the query made to the knowledge base.

\n

This data type is used in the following API operations:

\n ", "smithy.api#sensitive": {} } }, @@ -1326,13 +1340,13 @@ "vectorSearchConfiguration": { "target": "com.amazonaws.bedrockagentruntime#KnowledgeBaseVectorSearchConfiguration", "traits": { - "smithy.api#documentation": "

Contains details about how the results from the vector search should be returned.

", + "smithy.api#documentation": "

Contains details about how the results from the vector search should be returned. For more information, see Query configurations.

", "smithy.api#required": {} } } }, "traits": { - "smithy.api#documentation": "

Contains details about how the results should be returned.

\n

This data type is used in the following API operations:

\n " + "smithy.api#documentation": "

Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#KnowledgeBaseRetrievalResult": { @@ -1359,7 +1373,7 @@ } }, "traits": { - "smithy.api#documentation": "

Details about a result from querying the knowledge base.

" + "smithy.api#documentation": "

Details about a result from querying the knowledge base.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#KnowledgeBaseRetrievalResults": { @@ -1393,10 +1407,16 @@ "traits": { "smithy.api#documentation": "

Contains configurations for how to retrieve and return the knowledge base query.

" } + }, + "generationConfiguration": { + "target": "com.amazonaws.bedrockagentruntime#GenerationConfiguration", + "traits": { + "smithy.api#documentation": "

Contains configurations for response generation based on the knowwledge base query results.

" + } } }, "traits": { - "smithy.api#documentation": "

Contains details about the resource being queried.

" + "smithy.api#documentation": "

Contains details about the resource being queried.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#KnowledgeBaseVectorSearchConfiguration": { @@ -1407,10 +1427,10 @@ "traits": { "smithy.api#addedDefault": {}, "smithy.api#default": 5, - "smithy.api#documentation": "

The number of results to return.

\n \n

The numberOfResults field is currently unsupported for RetrieveAndGenerate. Don't include it in this field if you are sending a RetrieveAndGenerate request.

\n
", + "smithy.api#documentation": "

The number of source chunks to retrieve.

", "smithy.api#range": { "min": 1, - "max": 25 + "max": 100 } } }, @@ -1422,7 +1442,7 @@ } }, "traits": { - "smithy.api#documentation": "

Configurations for how to carry out the search.

" + "smithy.api#documentation": "

Configurations for how to perform the search query and return results. For more information, see Query configurations.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#LambdaArn": { @@ -1782,6 +1802,20 @@ "target": "smithy.api#String" } }, + "com.amazonaws.bedrockagentruntime#PromptTemplate": { + "type": "structure", + "members": { + "textPromptTemplate": { + "target": "com.amazonaws.bedrockagentruntime#TextPromptTemplate", + "traits": { + "smithy.api#documentation": "

The template for the prompt that's sent to the model for response generation. You can include prompt placeholders, which become replaced before the prompt is sent to the model to provide instructions and context to the model. In addition, you can include XML tags to delineate meaningful sections of the prompt template.

\n

For more information, see the following resources:

\n " + } + } + }, + "traits": { + "smithy.api#documentation": "

Contains the template for the prompt that's sent to the model for response generation. For more information, see Knowledge base prompt templates.

\n

This data type is used in the following API operations:

\n " + } + }, "com.amazonaws.bedrockagentruntime#PromptText": { "type": "string", "traits": { @@ -1979,7 +2013,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the cited text from the data source.

", + "smithy.api#documentation": "

Contains the cited text from the data source.

\n

This data type is used in the following API operations:

\n ", "smithy.api#sensitive": {} } }, @@ -2001,7 +2035,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains information about the location of the data source.

", + "smithy.api#documentation": "

Contains information about the location of the data source.

\n

This data type is used in the following API operations:

\n ", "smithy.api#sensitive": {} } }, @@ -2027,7 +2061,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the S3 location of the data source.

" + "smithy.api#documentation": "

Contains the S3 location of the data source.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#Retrieve": { @@ -2120,7 +2154,7 @@ } ], "traits": { - "smithy.api#documentation": "

Queries a knowledge base and generates responses based on the retrieved results. The response cites up to five sources but only selects the ones that are relevant to the query.

\n \n

The numberOfResults field is currently unsupported for RetrieveAndGenerate. Don't include it in the vectorSearchConfiguration object.

\n
", + "smithy.api#documentation": "

Queries a knowledge base and generates responses based on the retrieved results. The response cites up to five sources but only selects the ones that are relevant to the query.

", "smithy.api#http": { "code": 200, "method": "POST", @@ -2146,7 +2180,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains details about the resource being queried.

" + "smithy.api#documentation": "

Contains details about the resource being queried.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#RetrieveAndGenerateInput": { @@ -2164,7 +2198,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the query made to the knowledge base.

", + "smithy.api#documentation": "

Contains the query made to the knowledge base.

\n

This data type is used in the following API operations:

\n ", "smithy.api#sensitive": {} } }, @@ -2180,7 +2214,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the response generated from querying the knowledge base.

", + "smithy.api#documentation": "

Contains the response generated from querying the knowledge base.

\n

This data type is used in the following API operations:

\n ", "smithy.api#sensitive": {} } }, @@ -2196,14 +2230,14 @@ "input": { "target": "com.amazonaws.bedrockagentruntime#RetrieveAndGenerateInput", "traits": { - "smithy.api#documentation": "

Contains the query made to the knowledge base.

", + "smithy.api#documentation": "

Contains the query to be made to the knowledge base.

", "smithy.api#required": {} } }, "retrieveAndGenerateConfiguration": { "target": "com.amazonaws.bedrockagentruntime#RetrieveAndGenerateConfiguration", "traits": { - "smithy.api#documentation": "

Contains details about the resource being queried and the foundation model used for generation.

" + "smithy.api#documentation": "

Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.

" } }, "sessionConfiguration": { @@ -2265,7 +2299,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains configuration about the session with the knowledge base.

" + "smithy.api#documentation": "

Contains configuration about the session with the knowledge base.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#RetrieveAndGenerateType": { @@ -2293,14 +2327,14 @@ "retrievalQuery": { "target": "com.amazonaws.bedrockagentruntime#KnowledgeBaseQuery", "traits": { - "smithy.api#documentation": "

The query to send the knowledge base.

", + "smithy.api#documentation": "

Contains the query to send the knowledge base.

", "smithy.api#required": {} } }, "retrievalConfiguration": { "target": "com.amazonaws.bedrockagentruntime#KnowledgeBaseRetrievalConfiguration", "traits": { - "smithy.api#documentation": "

Contains details about how the results should be returned.

" + "smithy.api#documentation": "

Contains configurations for the knowledge base query and retrieval process. For more information, see Query configurations.

" } }, "nextToken": { @@ -2360,7 +2394,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains metadata about a sources cited for the generated response.

" + "smithy.api#documentation": "

Contains metadata about a source cited for the generated response.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#RetrievedReferences": { @@ -2435,7 +2469,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a Lambda function for an action group or pass them when making an InvokeAgent request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see Session context.

" + "smithy.api#documentation": "

Contains parameters that specify various attributes that persist across a session or prompt. You can define session state attributes as key-value pairs when writing a Lambda function for an action group or pass them when making an InvokeAgent request. Use session state attributes to control and provide conversational context for your agent and to help customize your agent's behavior. For more information, see Control session context.

" } }, "com.amazonaws.bedrockagentruntime#Source": { @@ -2487,7 +2521,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains information about where the text with a citation begins and ends in the generated output.

" + "smithy.api#documentation": "

Contains information about where the text with a citation begins and ends in the generated output.

\n

This data type is used in the following API operations:

\n " } }, "com.amazonaws.bedrockagentruntime#StopSequences": { @@ -2511,6 +2545,16 @@ } } }, + "com.amazonaws.bedrockagentruntime#TextPromptTemplate": { + "type": "string", + "traits": { + "smithy.api#length": { + "min": 1, + "max": 4000 + }, + "smithy.api#sensitive": {} + } + }, "com.amazonaws.bedrockagentruntime#TextResponsePart": { "type": "structure", "members": { @@ -2528,7 +2572,7 @@ } }, "traits": { - "smithy.api#documentation": "

Contains the part of the generated text that contains a citation, alongside where it begins and ends.

", + "smithy.api#documentation": "

Contains the part of the generated text that contains a citation, alongside where it begins and ends.

\n

This data type is used in the following API operations:

\n ", "smithy.api#sensitive": {} } },