AWS SDK for C++

AWS SDK for C++ Version 1.11.745

Loading...
Searching...
No Matches
InferenceConfiguration.h
1
6#pragma once
7#include <aws/bedrock-runtime/BedrockRuntime_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 BedrockRuntime {
21namespace Model {
22
41 public:
42 AWS_BEDROCKRUNTIME_API InferenceConfiguration() = default;
45 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
46
48
55 inline int GetMaxTokens() const { return m_maxTokens; }
56 inline bool MaxTokensHasBeenSet() const { return m_maxTokensHasBeenSet; }
57 inline void SetMaxTokens(int value) {
58 m_maxTokensHasBeenSet = true;
59 m_maxTokens = value;
60 }
62 SetMaxTokens(value);
63 return *this;
64 }
66
68
77 inline double GetTemperature() const { return m_temperature; }
78 inline bool TemperatureHasBeenSet() const { return m_temperatureHasBeenSet; }
79 inline void SetTemperature(double value) {
80 m_temperatureHasBeenSet = true;
81 m_temperature = value;
82 }
84 SetTemperature(value);
85 return *this;
86 }
88
90
99 inline double GetTopP() const { return m_topP; }
100 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
101 inline void SetTopP(double value) {
102 m_topPHasBeenSet = true;
103 m_topP = value;
104 }
105 inline InferenceConfiguration& WithTopP(double value) {
106 SetTopP(value);
107 return *this;
108 }
110
112
116 inline const Aws::Vector<Aws::String>& GetStopSequences() const { return m_stopSequences; }
117 inline bool StopSequencesHasBeenSet() const { return m_stopSequencesHasBeenSet; }
118 template <typename StopSequencesT = Aws::Vector<Aws::String>>
120 m_stopSequencesHasBeenSet = true;
121 m_stopSequences = std::forward<StopSequencesT>(value);
122 }
123 template <typename StopSequencesT = Aws::Vector<Aws::String>>
125 SetStopSequences(std::forward<StopSequencesT>(value));
126 return *this;
127 }
128 template <typename StopSequencesT = Aws::String>
130 m_stopSequencesHasBeenSet = true;
131 m_stopSequences.emplace_back(std::forward<StopSequencesT>(value));
132 return *this;
133 }
135 private:
136 int m_maxTokens{0};
137
138 double m_temperature{0.0};
139
140 double m_topP{0.0};
141
142 Aws::Vector<Aws::String> m_stopSequences;
143 bool m_maxTokensHasBeenSet = false;
144 bool m_temperatureHasBeenSet = false;
145 bool m_topPHasBeenSet = false;
146 bool m_stopSequencesHasBeenSet = false;
147};
148
149} // namespace Model
150} // namespace BedrockRuntime
151} // namespace Aws
AWS_BEDROCKRUNTIME_API InferenceConfiguration(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetStopSequences() const
AWS_BEDROCKRUNTIME_API InferenceConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
InferenceConfiguration & WithStopSequences(StopSequencesT &&value)
InferenceConfiguration & AddStopSequences(StopSequencesT &&value)
AWS_BEDROCKRUNTIME_API InferenceConfiguration()=default
InferenceConfiguration & WithTemperature(double value)
AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue