AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
GenerationConfiguration.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_EXPORTS.h>
8#include <aws/bedrock-agent-runtime/model/GuardrailConfiguration.h>
9#include <aws/bedrock-agent-runtime/model/InferenceConfig.h>
10#include <aws/bedrock-agent-runtime/model/PerformanceConfiguration.h>
11#include <aws/bedrock-agent-runtime/model/PromptTemplate.h>
12#include <aws/core/utils/Document.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace BedrockAgentRuntime {
26namespace Model {
27
38 public:
39 AWS_BEDROCKAGENTRUNTIME_API GenerationConfiguration() = default;
42 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
43
45
51 return m_additionalModelRequestFields;
52 }
53 inline bool AdditionalModelRequestFieldsHasBeenSet() const { return m_additionalModelRequestFieldsHasBeenSet; }
54 template <typename AdditionalModelRequestFieldsT = Aws::Map<Aws::String, Aws::Utils::Document>>
56 m_additionalModelRequestFieldsHasBeenSet = true;
57 m_additionalModelRequestFields = std::forward<AdditionalModelRequestFieldsT>(value);
58 }
59 template <typename AdditionalModelRequestFieldsT = Aws::Map<Aws::String, Aws::Utils::Document>>
61 SetAdditionalModelRequestFields(std::forward<AdditionalModelRequestFieldsT>(value));
62 return *this;
63 }
64 template <typename AdditionalModelRequestFieldsKeyT = Aws::String, typename AdditionalModelRequestFieldsValueT = Aws::Utils::Document>
67 m_additionalModelRequestFieldsHasBeenSet = true;
68 m_additionalModelRequestFields.emplace(std::forward<AdditionalModelRequestFieldsKeyT>(key),
69 std::forward<AdditionalModelRequestFieldsValueT>(value));
70 return *this;
71 }
73
75
78 inline const GuardrailConfiguration& GetGuardrailConfiguration() const { return m_guardrailConfiguration; }
79 inline bool GuardrailConfigurationHasBeenSet() const { return m_guardrailConfigurationHasBeenSet; }
80 template <typename GuardrailConfigurationT = GuardrailConfiguration>
82 m_guardrailConfigurationHasBeenSet = true;
83 m_guardrailConfiguration = std::forward<GuardrailConfigurationT>(value);
84 }
85 template <typename GuardrailConfigurationT = GuardrailConfiguration>
87 SetGuardrailConfiguration(std::forward<GuardrailConfigurationT>(value));
88 return *this;
89 }
91
93
97 inline const InferenceConfig& GetInferenceConfig() const { return m_inferenceConfig; }
98 inline bool InferenceConfigHasBeenSet() const { return m_inferenceConfigHasBeenSet; }
99 template <typename InferenceConfigT = InferenceConfig>
101 m_inferenceConfigHasBeenSet = true;
102 m_inferenceConfig = std::forward<InferenceConfigT>(value);
103 }
104 template <typename InferenceConfigT = InferenceConfig>
106 SetInferenceConfig(std::forward<InferenceConfigT>(value));
107 return *this;
108 }
110
112
115 inline const PerformanceConfiguration& GetPerformanceConfig() const { return m_performanceConfig; }
116 inline bool PerformanceConfigHasBeenSet() const { return m_performanceConfigHasBeenSet; }
117 template <typename PerformanceConfigT = PerformanceConfiguration>
119 m_performanceConfigHasBeenSet = true;
120 m_performanceConfig = std::forward<PerformanceConfigT>(value);
121 }
122 template <typename PerformanceConfigT = PerformanceConfiguration>
124 SetPerformanceConfig(std::forward<PerformanceConfigT>(value));
125 return *this;
126 }
128
130
137 inline const PromptTemplate& GetPromptTemplate() const { return m_promptTemplate; }
138 inline bool PromptTemplateHasBeenSet() const { return m_promptTemplateHasBeenSet; }
139 template <typename PromptTemplateT = PromptTemplate>
141 m_promptTemplateHasBeenSet = true;
142 m_promptTemplate = std::forward<PromptTemplateT>(value);
143 }
144 template <typename PromptTemplateT = PromptTemplate>
146 SetPromptTemplate(std::forward<PromptTemplateT>(value));
147 return *this;
148 }
150 private:
151 Aws::Map<Aws::String, Aws::Utils::Document> m_additionalModelRequestFields;
152
153 GuardrailConfiguration m_guardrailConfiguration;
154
155 InferenceConfig m_inferenceConfig;
156
157 PerformanceConfiguration m_performanceConfig;
158
159 PromptTemplate m_promptTemplate;
160 bool m_additionalModelRequestFieldsHasBeenSet = false;
161 bool m_guardrailConfigurationHasBeenSet = false;
162 bool m_inferenceConfigHasBeenSet = false;
163 bool m_performanceConfigHasBeenSet = false;
164 bool m_promptTemplateHasBeenSet = false;
165};
166
167} // namespace Model
168} // namespace BedrockAgentRuntime
169} // namespace Aws
GenerationConfiguration & WithInferenceConfig(InferenceConfigT &&value)
GenerationConfiguration & AddAdditionalModelRequestFields(AdditionalModelRequestFieldsKeyT &&key, AdditionalModelRequestFieldsValueT &&value)
const PerformanceConfiguration & GetPerformanceConfig() const
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_BEDROCKAGENTRUNTIME_API GenerationConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKAGENTRUNTIME_API GenerationConfiguration()=default
GenerationConfiguration & WithPerformanceConfig(PerformanceConfigT &&value)
GenerationConfiguration & WithPromptTemplate(PromptTemplateT &&value)
GenerationConfiguration & WithAdditionalModelRequestFields(AdditionalModelRequestFieldsT &&value)
const Aws::Map< Aws::String, Aws::Utils::Document > & GetAdditionalModelRequestFields() const
void SetAdditionalModelRequestFields(AdditionalModelRequestFieldsT &&value)
AWS_BEDROCKAGENTRUNTIME_API GenerationConfiguration(Aws::Utils::Json::JsonView jsonValue)
const GuardrailConfiguration & GetGuardrailConfiguration() const
void SetGuardrailConfiguration(GuardrailConfigurationT &&value)
GenerationConfiguration & WithGuardrailConfiguration(GuardrailConfigurationT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Aws::Utils::Json::JsonValue JsonValue