AWS SDK for C++

AWS SDK for C++ Version 1.11.610

Loading...
Searching...
No Matches
GenerationConfiguration.h
1
6#pragma once
7#include <aws/bedrock/Bedrock_EXPORTS.h>
8#include <aws/bedrock/model/PromptTemplate.h>
9#include <aws/bedrock/model/GuardrailConfiguration.h>
10#include <aws/bedrock/model/KbInferenceConfig.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13#include <aws/core/utils/Document.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Utils
19{
20namespace Json
21{
22 class JsonValue;
23 class JsonView;
24} // namespace Json
25} // namespace Utils
26namespace Bedrock
27{
28namespace Model
29{
30
38 {
39 public:
40 AWS_BEDROCK_API GenerationConfiguration() = default;
43 AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const;
44
45
47
51 inline const PromptTemplate& GetPromptTemplate() const { return m_promptTemplate; }
52 inline bool PromptTemplateHasBeenSet() const { return m_promptTemplateHasBeenSet; }
53 template<typename PromptTemplateT = PromptTemplate>
54 void SetPromptTemplate(PromptTemplateT&& value) { m_promptTemplateHasBeenSet = true; m_promptTemplate = std::forward<PromptTemplateT>(value); }
55 template<typename PromptTemplateT = PromptTemplate>
56 GenerationConfiguration& WithPromptTemplate(PromptTemplateT&& value) { SetPromptTemplate(std::forward<PromptTemplateT>(value)); return *this;}
58
60
63 inline const GuardrailConfiguration& GetGuardrailConfiguration() const { return m_guardrailConfiguration; }
64 inline bool GuardrailConfigurationHasBeenSet() const { return m_guardrailConfigurationHasBeenSet; }
65 template<typename GuardrailConfigurationT = GuardrailConfiguration>
66 void SetGuardrailConfiguration(GuardrailConfigurationT&& value) { m_guardrailConfigurationHasBeenSet = true; m_guardrailConfiguration = std::forward<GuardrailConfigurationT>(value); }
67 template<typename GuardrailConfigurationT = GuardrailConfiguration>
68 GenerationConfiguration& WithGuardrailConfiguration(GuardrailConfigurationT&& value) { SetGuardrailConfiguration(std::forward<GuardrailConfigurationT>(value)); return *this;}
70
72
76 inline const KbInferenceConfig& GetKbInferenceConfig() const { return m_kbInferenceConfig; }
77 inline bool KbInferenceConfigHasBeenSet() const { return m_kbInferenceConfigHasBeenSet; }
78 template<typename KbInferenceConfigT = KbInferenceConfig>
79 void SetKbInferenceConfig(KbInferenceConfigT&& value) { m_kbInferenceConfigHasBeenSet = true; m_kbInferenceConfig = std::forward<KbInferenceConfigT>(value); }
80 template<typename KbInferenceConfigT = KbInferenceConfig>
81 GenerationConfiguration& WithKbInferenceConfig(KbInferenceConfigT&& value) { SetKbInferenceConfig(std::forward<KbInferenceConfigT>(value)); return *this;}
83
85
91 inline const Aws::Map<Aws::String, Aws::Utils::Document>& GetAdditionalModelRequestFields() const { return m_additionalModelRequestFields; }
92 inline bool AdditionalModelRequestFieldsHasBeenSet() const { return m_additionalModelRequestFieldsHasBeenSet; }
93 template<typename AdditionalModelRequestFieldsT = Aws::Map<Aws::String, Aws::Utils::Document>>
94 void SetAdditionalModelRequestFields(AdditionalModelRequestFieldsT&& value) { m_additionalModelRequestFieldsHasBeenSet = true; m_additionalModelRequestFields = std::forward<AdditionalModelRequestFieldsT>(value); }
95 template<typename AdditionalModelRequestFieldsT = Aws::Map<Aws::String, Aws::Utils::Document>>
96 GenerationConfiguration& WithAdditionalModelRequestFields(AdditionalModelRequestFieldsT&& value) { SetAdditionalModelRequestFields(std::forward<AdditionalModelRequestFieldsT>(value)); return *this;}
97 template<typename AdditionalModelRequestFieldsKeyT = Aws::String, typename AdditionalModelRequestFieldsValueT = Aws::Utils::Document>
98 GenerationConfiguration& AddAdditionalModelRequestFields(AdditionalModelRequestFieldsKeyT&& key, AdditionalModelRequestFieldsValueT&& value) {
99 m_additionalModelRequestFieldsHasBeenSet = true; m_additionalModelRequestFields.emplace(std::forward<AdditionalModelRequestFieldsKeyT>(key), std::forward<AdditionalModelRequestFieldsValueT>(value)); return *this;
100 }
102 private:
103
104 PromptTemplate m_promptTemplate;
105 bool m_promptTemplateHasBeenSet = false;
106
107 GuardrailConfiguration m_guardrailConfiguration;
108 bool m_guardrailConfigurationHasBeenSet = false;
109
110 KbInferenceConfig m_kbInferenceConfig;
111 bool m_kbInferenceConfigHasBeenSet = false;
112
113 Aws::Map<Aws::String, Aws::Utils::Document> m_additionalModelRequestFields;
114 bool m_additionalModelRequestFieldsHasBeenSet = false;
115 };
116
117} // namespace Model
118} // namespace Bedrock
119} // namespace Aws
void SetKbInferenceConfig(KbInferenceConfigT &&value)
AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_BEDROCK_API GenerationConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetGuardrailConfiguration(GuardrailConfigurationT &&value)
const KbInferenceConfig & GetKbInferenceConfig() const
const GuardrailConfiguration & GetGuardrailConfiguration() const
AWS_BEDROCK_API GenerationConfiguration(Aws::Utils::Json::JsonView jsonValue)
GenerationConfiguration & WithAdditionalModelRequestFields(AdditionalModelRequestFieldsT &&value)
const Aws::Map< Aws::String, Aws::Utils::Document > & GetAdditionalModelRequestFields() const
void SetAdditionalModelRequestFields(AdditionalModelRequestFieldsT &&value)
GenerationConfiguration & WithKbInferenceConfig(KbInferenceConfigT &&value)
GenerationConfiguration & AddAdditionalModelRequestFields(AdditionalModelRequestFieldsKeyT &&key, AdditionalModelRequestFieldsValueT &&value)
GenerationConfiguration & WithGuardrailConfiguration(GuardrailConfigurationT &&value)
AWS_BEDROCK_API GenerationConfiguration()=default
GenerationConfiguration & WithPromptTemplate(PromptTemplateT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Aws::Utils::Json::JsonValue JsonValue