AWS SDK for C++

AWS SDK for C++ Version 1.11.610

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/AWSVector.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <utility>
11
12namespace Aws
13{
14namespace Utils
15{
16namespace Json
17{
18 class JsonValue;
19 class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace BedrockRuntime
23{
24namespace Model
25{
26
45 {
46 public:
47 AWS_BEDROCKRUNTIME_API InferenceConfiguration() = default;
48 AWS_BEDROCKRUNTIME_API InferenceConfiguration(Aws::Utils::Json::JsonView jsonValue);
50 AWS_BEDROCKRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
51
52
54
61 inline int GetMaxTokens() const { return m_maxTokens; }
62 inline bool MaxTokensHasBeenSet() const { return m_maxTokensHasBeenSet; }
63 inline void SetMaxTokens(int value) { m_maxTokensHasBeenSet = true; m_maxTokens = value; }
64 inline InferenceConfiguration& WithMaxTokens(int value) { SetMaxTokens(value); return *this;}
66
68
77 inline double GetTemperature() const { return m_temperature; }
78 inline bool TemperatureHasBeenSet() const { return m_temperatureHasBeenSet; }
79 inline void SetTemperature(double value) { m_temperatureHasBeenSet = true; m_temperature = value; }
80 inline InferenceConfiguration& WithTemperature(double value) { SetTemperature(value); return *this;}
82
84
93 inline double GetTopP() const { return m_topP; }
94 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
95 inline void SetTopP(double value) { m_topPHasBeenSet = true; m_topP = value; }
96 inline InferenceConfiguration& WithTopP(double value) { SetTopP(value); return *this;}
98
100
104 inline const Aws::Vector<Aws::String>& GetStopSequences() const { return m_stopSequences; }
105 inline bool StopSequencesHasBeenSet() const { return m_stopSequencesHasBeenSet; }
106 template<typename StopSequencesT = Aws::Vector<Aws::String>>
107 void SetStopSequences(StopSequencesT&& value) { m_stopSequencesHasBeenSet = true; m_stopSequences = std::forward<StopSequencesT>(value); }
108 template<typename StopSequencesT = Aws::Vector<Aws::String>>
109 InferenceConfiguration& WithStopSequences(StopSequencesT&& value) { SetStopSequences(std::forward<StopSequencesT>(value)); return *this;}
110 template<typename StopSequencesT = Aws::String>
111 InferenceConfiguration& AddStopSequences(StopSequencesT&& value) { m_stopSequencesHasBeenSet = true; m_stopSequences.emplace_back(std::forward<StopSequencesT>(value)); return *this; }
113 private:
114
115 int m_maxTokens{0};
116 bool m_maxTokensHasBeenSet = false;
117
118 double m_temperature{0.0};
119 bool m_temperatureHasBeenSet = false;
120
121 double m_topP{0.0};
122 bool m_topPHasBeenSet = false;
123
124 Aws::Vector<Aws::String> m_stopSequences;
125 bool m_stopSequencesHasBeenSet = false;
126 };
127
128} // namespace Model
129} // namespace BedrockRuntime
130} // namespace Aws
AWS_BEDROCKRUNTIME_API InferenceConfiguration(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::String > & GetStopSequences() const
InferenceConfiguration & WithTopP(double value)
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::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue