AWS SDK for C++

AWS SDK for C++ Version 1.11.750

Loading...
Searching...
No Matches
InferenceConfiguration.h
1
6#pragma once
7#include <aws/bedrock-agent/BedrockAgent_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Json {
16class JsonValue;
17class JsonView;
18} // namespace Json
19} // namespace Utils
20namespace BedrockAgent {
21namespace Model {
22
33 public:
34 AWS_BEDROCKAGENT_API InferenceConfiguration() = default;
37 AWS_BEDROCKAGENT_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
46 inline double GetTemperature() const { return m_temperature; }
47 inline bool TemperatureHasBeenSet() const { return m_temperatureHasBeenSet; }
48 inline void SetTemperature(double value) {
49 m_temperatureHasBeenSet = true;
50 m_temperature = value;
51 }
53 SetTemperature(value);
54 return *this;
55 }
57
59
67 inline double GetTopP() const { return m_topP; }
68 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
69 inline void SetTopP(double value) {
70 m_topPHasBeenSet = true;
71 m_topP = value;
72 }
73 inline InferenceConfiguration& WithTopP(double value) {
74 SetTopP(value);
75 return *this;
76 }
78
80
88 inline int GetTopK() const { return m_topK; }
89 inline bool TopKHasBeenSet() const { return m_topKHasBeenSet; }
90 inline void SetTopK(int value) {
91 m_topKHasBeenSet = true;
92 m_topK = value;
93 }
94 inline InferenceConfiguration& WithTopK(int value) {
95 SetTopK(value);
96 return *this;
97 }
99
101
104 inline int GetMaximumLength() const { return m_maximumLength; }
105 inline bool MaximumLengthHasBeenSet() const { return m_maximumLengthHasBeenSet; }
106 inline void SetMaximumLength(int value) {
107 m_maximumLengthHasBeenSet = true;
108 m_maximumLength = value;
109 }
111 SetMaximumLength(value);
112 return *this;
113 }
115
117
121 inline const Aws::Vector<Aws::String>& GetStopSequences() const { return m_stopSequences; }
122 inline bool StopSequencesHasBeenSet() const { return m_stopSequencesHasBeenSet; }
123 template <typename StopSequencesT = Aws::Vector<Aws::String>>
125 m_stopSequencesHasBeenSet = true;
126 m_stopSequences = std::forward<StopSequencesT>(value);
127 }
128 template <typename StopSequencesT = Aws::Vector<Aws::String>>
130 SetStopSequences(std::forward<StopSequencesT>(value));
131 return *this;
132 }
133 template <typename StopSequencesT = Aws::String>
135 m_stopSequencesHasBeenSet = true;
136 m_stopSequences.emplace_back(std::forward<StopSequencesT>(value));
137 return *this;
138 }
140 private:
141 double m_temperature{0.0};
142
143 double m_topP{0.0};
144
145 int m_topK{0};
146
147 int m_maximumLength{0};
148
149 Aws::Vector<Aws::String> m_stopSequences;
150 bool m_temperatureHasBeenSet = false;
151 bool m_topPHasBeenSet = false;
152 bool m_topKHasBeenSet = false;
153 bool m_maximumLengthHasBeenSet = false;
154 bool m_stopSequencesHasBeenSet = false;
155};
156
157} // namespace Model
158} // namespace BedrockAgent
159} // namespace Aws
AWS_BEDROCKAGENT_API InferenceConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
InferenceConfiguration & WithTemperature(double value)
InferenceConfiguration & AddStopSequences(StopSequencesT &&value)
AWS_BEDROCKAGENT_API InferenceConfiguration()=default
InferenceConfiguration & WithMaximumLength(int value)
AWS_BEDROCKAGENT_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< Aws::String > & GetStopSequences() const
AWS_BEDROCKAGENT_API InferenceConfiguration(Aws::Utils::Json::JsonView jsonValue)
InferenceConfiguration & WithTopP(double value)
InferenceConfiguration & WithStopSequences(StopSequencesT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue