From 727ecb2f9b326a1764745511277634165fe2705b Mon Sep 17 00:00:00 2001 From: aws-sdk-dotnet-automation Date: Thu, 17 Oct 2024 18:27:12 +0000 Subject: [PATCH] Removing support for topK property in PromptModelInferenceConfiguration object, Making PromptTemplateConfiguration property as required, Limiting the maximum PromptVariant to 1 --- .../bedrock-agent-2023-06-05.api.json | 4 ++-- .../bedrock-agent-2023-06-05.docs.json | 5 ++--- .../bedrock-agent-2023-06-05.normal.json | 9 +++----- .../Generated/PropertyValueRules.xml | 5 ----- .../Generated/Model/CreatePromptRequest.cs | 2 +- .../Generated/Model/CreatePromptResponse.cs | 2 +- .../Model/CreatePromptVersionResponse.cs | 2 +- .../Generated/Model/GetIngestionJobRequest.cs | 2 +- .../Generated/Model/GetPromptResponse.cs | 2 +- ...ptModelInferenceConfigurationMarshaller.cs | 6 ------ ...ModelInferenceConfigurationUnmarshaller.cs | 6 ------ .../PromptModelInferenceConfiguration.cs | 21 ------------------- .../Generated/Model/PromptVariant.cs | 1 + .../Generated/Model/UpdatePromptRequest.cs | 2 +- .../Generated/Model/UpdatePromptResponse.cs | 2 +- .../_bcl35/AmazonBedrockAgentClient.cs | 2 +- .../Generated/_bcl35/IAmazonBedrockAgent.cs | 2 +- .../_bcl45/AmazonBedrockAgentClient.cs | 4 ++-- .../Generated/_bcl45/IAmazonBedrockAgent.cs | 4 ++-- .../_netstandard/AmazonBedrockAgentClient.cs | 2 +- .../_netstandard/IAmazonBedrockAgent.cs | 2 +- 21 files changed, 23 insertions(+), 64 deletions(-) diff --git a/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.api.json b/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.api.json index a35c11ff8c8b..1dd7eb32c07e 100644 --- a/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.api.json +++ b/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.api.json @@ -4525,7 +4525,6 @@ "maxTokens":{"shape":"MaximumLength"}, "stopSequences":{"shape":"StopSequences"}, "temperature":{"shape":"Temperature"}, - "topK":{"shape":"TopK"}, "topP":{"shape":"TopP"} } }, @@ -4599,6 +4598,7 @@ "type":"structure", "required":[ "name", + "templateConfiguration", "templateType" ], "members":{ @@ -4614,7 +4614,7 @@ "PromptVariantList":{ "type":"list", "member":{"shape":"PromptVariant"}, - "max":3, + "max":1, "min":0, "sensitive":true }, diff --git a/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.docs.json b/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.docs.json index 5afd77c44f48..0a7ffed8d50f 100644 --- a/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.docs.json +++ b/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.docs.json @@ -33,7 +33,7 @@ "GetFlow": "

Retrieves information about a flow. For more information, see Manage a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

", "GetFlowAlias": "

Retrieves information about a flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

", "GetFlowVersion": "

Retrieves information about a version of a flow. For more information, see Deploy a flow in Amazon Bedrock in the Amazon Bedrock User Guide.

", - "GetIngestionJob": "

Gets information about a data ingestion job. Data sources are ingested into your knowledge base so that Large Lanaguage Models (LLMs) can use your data.

", + "GetIngestionJob": "

Gets information about a data ingestion job. Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data.

", "GetKnowledgeBase": "

Gets information about a knoweldge base.

", "GetPrompt": "

Retrieves information about the working draft (DRAFT version) of a prompt or a version of it, depending on whether you include the promptVersion field or not. For more information, see View information about prompts using Prompt management and View information about a version of your prompt in the Amazon Bedrock User Guide.

", "ListAgentActionGroups": "

Lists the action groups for an agent and information about each one.

", @@ -3010,8 +3010,7 @@ "TopK": { "base": null, "refs": { - "InferenceConfiguration$topK": "

While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for topK is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topK to 50, the model selects the next token from among the top 50 most likely choices.

", - "PromptModelInferenceConfiguration$topK": "

The number of most-likely candidates that the model considers for the next token during generation.

" + "InferenceConfiguration$topK": "

While generating a response, the model determines the probability of the following token at each point of generation. The value that you set for topK is the number of most-likely candidates from which the model chooses the next token in the sequence. For example, if you set topK to 50, the model selects the next token from among the top 50 most likely choices.

" } }, "TopP": { diff --git a/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.normal.json b/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.normal.json index 3982bc494f4d..081f0f2300e9 100644 --- a/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.normal.json +++ b/generator/ServiceModels/bedrock-agent/bedrock-agent-2023-06-05.normal.json @@ -636,7 +636,7 @@ {"shape":"InternalServerException"}, {"shape":"ResourceNotFoundException"} ], - "documentation":"

Gets information about a data ingestion job. Data sources are ingested into your knowledge base so that Large Lanaguage Models (LLMs) can use your data.

" + "documentation":"

Gets information about a data ingestion job. Data sources are ingested into your knowledge base so that Large Language Models (LLMs) can use your data.

" }, "GetKnowledgeBase":{ "name":"GetKnowledgeBase", @@ -6469,10 +6469,6 @@ "shape":"Temperature", "documentation":"

Controls the randomness of the response. Choose a lower value for more predictable outputs and a higher value for more surprising outputs.

" }, - "topK":{ - "shape":"TopK", - "documentation":"

The number of most-likely candidates that the model considers for the next token during generation.

" - }, "topP":{ "shape":"TopP", "documentation":"

The percentage of most-likely candidates that the model considers for the next token.

" @@ -6583,6 +6579,7 @@ "type":"structure", "required":[ "name", + "templateConfiguration", "templateType" ], "members":{ @@ -6617,7 +6614,7 @@ "PromptVariantList":{ "type":"list", "member":{"shape":"PromptVariant"}, - "max":3, + "max":1, "min":0, "sensitive":true }, diff --git a/sdk/code-analysis/ServiceAnalysis/BedrockAgent/Generated/PropertyValueRules.xml b/sdk/code-analysis/ServiceAnalysis/BedrockAgent/Generated/PropertyValueRules.xml index 736ad8372f74..be741b138d55 100644 --- a/sdk/code-analysis/ServiceAnalysis/BedrockAgent/Generated/PropertyValueRules.xml +++ b/sdk/code-analysis/ServiceAnalysis/BedrockAgent/Generated/PropertyValueRules.xml @@ -2181,11 +2181,6 @@ 0 1 - - Amazon.BedrockAgent.Model.PromptModelInferenceConfiguration.TopK - 0 - 500 - Amazon.BedrockAgent.Model.PromptModelInferenceConfiguration.TopP 0 diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptRequest.cs b/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptRequest.cs index 2eddc2ef4bfd..01d1cdd2c8f4 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptRequest.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptRequest.cs @@ -171,7 +171,7 @@ internal bool IsSetTags() /// A list of objects, each containing details about a variant of the prompt. /// /// - [AWSProperty(Sensitive=true, Min=0, Max=3)] + [AWSProperty(Sensitive=true, Min=0, Max=1)] public List Variants { get { return this._variants; } diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptResponse.cs b/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptResponse.cs index f42d231508aa..77259d25504c 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptResponse.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptResponse.cs @@ -202,7 +202,7 @@ internal bool IsSetUpdatedAt() /// A list of objects, each containing details about a variant of the prompt. /// /// - [AWSProperty(Sensitive=true, Min=0, Max=3)] + [AWSProperty(Sensitive=true, Min=0, Max=1)] public List Variants { get { return this._variants; } diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptVersionResponse.cs b/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptVersionResponse.cs index 4ad1906dee1a..a928a4d2293d 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptVersionResponse.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/CreatePromptVersionResponse.cs @@ -204,7 +204,7 @@ internal bool IsSetUpdatedAt() /// A list of objects, each containing details about a variant of the prompt. /// /// - [AWSProperty(Sensitive=true, Min=0, Max=3)] + [AWSProperty(Sensitive=true, Min=0, Max=1)] public List Variants { get { return this._variants; } diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/GetIngestionJobRequest.cs b/sdk/src/Services/BedrockAgent/Generated/Model/GetIngestionJobRequest.cs index 7680f0e6bc21..2442ba84e1a7 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/GetIngestionJobRequest.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/GetIngestionJobRequest.cs @@ -32,7 +32,7 @@ namespace Amazon.BedrockAgent.Model /// /// Container for the parameters to the GetIngestionJob operation. /// Gets information about a data ingestion job. Data sources are ingested into your knowledge - /// base so that Large Lanaguage Models (LLMs) can use your data. + /// base so that Large Language Models (LLMs) can use your data. /// public partial class GetIngestionJobRequest : AmazonBedrockAgentRequest { diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/GetPromptResponse.cs b/sdk/src/Services/BedrockAgent/Generated/Model/GetPromptResponse.cs index c717eb513684..95819ce748ec 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/GetPromptResponse.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/GetPromptResponse.cs @@ -205,7 +205,7 @@ internal bool IsSetUpdatedAt() /// A list of objects, each containing details about a variant of the prompt. /// /// - [AWSProperty(Sensitive=true, Min=0, Max=3)] + [AWSProperty(Sensitive=true, Min=0, Max=1)] public List Variants { get { return this._variants; } diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/PromptModelInferenceConfigurationMarshaller.cs b/sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/PromptModelInferenceConfigurationMarshaller.cs index c0553a7b8cfb..fdc55cbd9607 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/PromptModelInferenceConfigurationMarshaller.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/PromptModelInferenceConfigurationMarshaller.cs @@ -78,12 +78,6 @@ public void Marshall(PromptModelInferenceConfiguration requestObject, JsonMarsha } } - if(requestObject.IsSetTopK()) - { - context.Writer.WritePropertyName("topK"); - context.Writer.Write(requestObject.TopK); - } - if(requestObject.IsSetTopP()) { context.Writer.WritePropertyName("topP"); diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/PromptModelInferenceConfigurationUnmarshaller.cs b/sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/PromptModelInferenceConfigurationUnmarshaller.cs index bba06c7564e2..7ad4725b0cad 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/PromptModelInferenceConfigurationUnmarshaller.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/Internal/MarshallTransformations/PromptModelInferenceConfigurationUnmarshaller.cs @@ -84,12 +84,6 @@ public PromptModelInferenceConfiguration Unmarshall(JsonUnmarshallerContext cont unmarshalledObject.Temperature = unmarshaller.Unmarshall(context); continue; } - if (context.TestExpression("topK", targetDepth)) - { - var unmarshaller = IntUnmarshaller.Instance; - unmarshalledObject.TopK = unmarshaller.Unmarshall(context); - continue; - } if (context.TestExpression("topP", targetDepth)) { var unmarshaller = FloatUnmarshaller.Instance; diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/PromptModelInferenceConfiguration.cs b/sdk/src/Services/BedrockAgent/Generated/Model/PromptModelInferenceConfiguration.cs index 3282a24cbed2..28e8cb577728 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/PromptModelInferenceConfiguration.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/PromptModelInferenceConfiguration.cs @@ -39,7 +39,6 @@ public partial class PromptModelInferenceConfiguration private int? _maxTokens; private List _stopSequences = AWSConfigs.InitializeCollections ? new List() : null; private float? _temperature; - private int? _topk; private float? _topp; /// @@ -100,26 +99,6 @@ internal bool IsSetTemperature() return this._temperature.HasValue; } - /// - /// Gets and sets the property TopK. - /// - /// The number of most-likely candidates that the model considers for the next token during - /// generation. - /// - /// - [AWSProperty(Min=0, Max=500)] - public int TopK - { - get { return this._topk.GetValueOrDefault(); } - set { this._topk = value; } - } - - // Check to see if TopK property is set - internal bool IsSetTopK() - { - return this._topk.HasValue; - } - /// /// Gets and sets the property TopP. /// diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/PromptVariant.cs b/sdk/src/Services/BedrockAgent/Generated/Model/PromptVariant.cs index 7b928e6f3a23..bb860f995270 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/PromptVariant.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/PromptVariant.cs @@ -125,6 +125,7 @@ internal bool IsSetName() /// Contains configurations for the prompt template. /// /// + [AWSProperty(Required=true)] public PromptTemplateConfiguration TemplateConfiguration { get { return this._templateConfiguration; } diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/UpdatePromptRequest.cs b/sdk/src/Services/BedrockAgent/Generated/Model/UpdatePromptRequest.cs index 546827b4b693..cfe5e8f33550 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/UpdatePromptRequest.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/UpdatePromptRequest.cs @@ -147,7 +147,7 @@ internal bool IsSetPromptIdentifier() /// A list of objects, each containing details about a variant of the prompt. /// /// - [AWSProperty(Sensitive=true, Min=0, Max=3)] + [AWSProperty(Sensitive=true, Min=0, Max=1)] public List Variants { get { return this._variants; } diff --git a/sdk/src/Services/BedrockAgent/Generated/Model/UpdatePromptResponse.cs b/sdk/src/Services/BedrockAgent/Generated/Model/UpdatePromptResponse.cs index ff7711332fa2..3bfcd2663eb0 100644 --- a/sdk/src/Services/BedrockAgent/Generated/Model/UpdatePromptResponse.cs +++ b/sdk/src/Services/BedrockAgent/Generated/Model/UpdatePromptResponse.cs @@ -204,7 +204,7 @@ internal bool IsSetUpdatedAt() /// A list of objects, each containing details about a variant of the prompt. /// /// - [AWSProperty(Sensitive=true, Min=0, Max=3)] + [AWSProperty(Sensitive=true, Min=0, Max=1)] public List Variants { get { return this._variants; } diff --git a/sdk/src/Services/BedrockAgent/Generated/_bcl35/AmazonBedrockAgentClient.cs b/sdk/src/Services/BedrockAgent/Generated/_bcl35/AmazonBedrockAgentClient.cs index cb5d87fab98b..dba9b053ff40 100644 --- a/sdk/src/Services/BedrockAgent/Generated/_bcl35/AmazonBedrockAgentClient.cs +++ b/sdk/src/Services/BedrockAgent/Generated/_bcl35/AmazonBedrockAgentClient.cs @@ -2675,7 +2675,7 @@ public virtual GetFlowVersionResponse EndGetFlowVersion(IAsyncResult asyncResult /// /// Gets information about a data ingestion job. Data sources are ingested into your knowledge - /// base so that Large Lanaguage Models (LLMs) can use your data. + /// base so that Large Language Models (LLMs) can use your data. /// /// Container for the necessary parameters to execute the GetIngestionJob service method. /// diff --git a/sdk/src/Services/BedrockAgent/Generated/_bcl35/IAmazonBedrockAgent.cs b/sdk/src/Services/BedrockAgent/Generated/_bcl35/IAmazonBedrockAgent.cs index 4f4071fc02e8..5f51b2f25250 100644 --- a/sdk/src/Services/BedrockAgent/Generated/_bcl35/IAmazonBedrockAgent.cs +++ b/sdk/src/Services/BedrockAgent/Generated/_bcl35/IAmazonBedrockAgent.cs @@ -2023,7 +2023,7 @@ public partial interface IAmazonBedrockAgent : IAmazonService, IDisposable /// /// Gets information about a data ingestion job. Data sources are ingested into your knowledge - /// base so that Large Lanaguage Models (LLMs) can use your data. + /// base so that Large Language Models (LLMs) can use your data. /// /// Container for the necessary parameters to execute the GetIngestionJob service method. /// diff --git a/sdk/src/Services/BedrockAgent/Generated/_bcl45/AmazonBedrockAgentClient.cs b/sdk/src/Services/BedrockAgent/Generated/_bcl45/AmazonBedrockAgentClient.cs index 753e646beac3..5fe1e6a51edf 100644 --- a/sdk/src/Services/BedrockAgent/Generated/_bcl45/AmazonBedrockAgentClient.cs +++ b/sdk/src/Services/BedrockAgent/Generated/_bcl45/AmazonBedrockAgentClient.cs @@ -3006,7 +3006,7 @@ public virtual GetFlowVersionResponse GetFlowVersion(GetFlowVersionRequest reque /// /// Gets information about a data ingestion job. Data sources are ingested into your knowledge - /// base so that Large Lanaguage Models (LLMs) can use your data. + /// base so that Large Language Models (LLMs) can use your data. /// /// Container for the necessary parameters to execute the GetIngestionJob service method. /// @@ -3040,7 +3040,7 @@ public virtual GetIngestionJobResponse GetIngestionJob(GetIngestionJobRequest re /// /// Gets information about a data ingestion job. Data sources are ingested into your knowledge - /// base so that Large Lanaguage Models (LLMs) can use your data. + /// base so that Large Language Models (LLMs) can use your data. /// /// Container for the necessary parameters to execute the GetIngestionJob service method. /// diff --git a/sdk/src/Services/BedrockAgent/Generated/_bcl45/IAmazonBedrockAgent.cs b/sdk/src/Services/BedrockAgent/Generated/_bcl45/IAmazonBedrockAgent.cs index b3ddb67f8e3d..bd173dd447a6 100644 --- a/sdk/src/Services/BedrockAgent/Generated/_bcl45/IAmazonBedrockAgent.cs +++ b/sdk/src/Services/BedrockAgent/Generated/_bcl45/IAmazonBedrockAgent.cs @@ -2382,7 +2382,7 @@ public partial interface IAmazonBedrockAgent : IAmazonService, IDisposable /// /// Gets information about a data ingestion job. Data sources are ingested into your knowledge - /// base so that Large Lanaguage Models (LLMs) can use your data. + /// base so that Large Language Models (LLMs) can use your data. /// /// Container for the necessary parameters to execute the GetIngestionJob service method. /// @@ -2410,7 +2410,7 @@ public partial interface IAmazonBedrockAgent : IAmazonService, IDisposable /// /// Gets information about a data ingestion job. Data sources are ingested into your knowledge - /// base so that Large Lanaguage Models (LLMs) can use your data. + /// base so that Large Language Models (LLMs) can use your data. /// /// Container for the necessary parameters to execute the GetIngestionJob service method. /// diff --git a/sdk/src/Services/BedrockAgent/Generated/_netstandard/AmazonBedrockAgentClient.cs b/sdk/src/Services/BedrockAgent/Generated/_netstandard/AmazonBedrockAgentClient.cs index 45f65fa88998..b21ed967fd4f 100644 --- a/sdk/src/Services/BedrockAgent/Generated/_netstandard/AmazonBedrockAgentClient.cs +++ b/sdk/src/Services/BedrockAgent/Generated/_netstandard/AmazonBedrockAgentClient.cs @@ -2070,7 +2070,7 @@ internal virtual GetIngestionJobResponse GetIngestionJob(GetIngestionJobRequest /// /// Gets information about a data ingestion job. Data sources are ingested into your knowledge - /// base so that Large Lanaguage Models (LLMs) can use your data. + /// base so that Large Language Models (LLMs) can use your data. /// /// Container for the necessary parameters to execute the GetIngestionJob service method. /// diff --git a/sdk/src/Services/BedrockAgent/Generated/_netstandard/IAmazonBedrockAgent.cs b/sdk/src/Services/BedrockAgent/Generated/_netstandard/IAmazonBedrockAgent.cs index 136991622eac..1dcb313e3c05 100644 --- a/sdk/src/Services/BedrockAgent/Generated/_netstandard/IAmazonBedrockAgent.cs +++ b/sdk/src/Services/BedrockAgent/Generated/_netstandard/IAmazonBedrockAgent.cs @@ -1340,7 +1340,7 @@ public partial interface IAmazonBedrockAgent : IAmazonService, IDisposable /// /// Gets information about a data ingestion job. Data sources are ingested into your knowledge - /// base so that Large Lanaguage Models (LLMs) can use your data. + /// base so that Large Language Models (LLMs) can use your data. /// /// Container for the necessary parameters to execute the GetIngestionJob service method. ///