AWS SDK for C++

AWS SDK for C++ Version 1.11.606

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/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 BedrockAgent
23{
24namespace Model
25{
26
37 {
38 public:
39 AWS_BEDROCKAGENT_API InferenceConfiguration() = default;
40 AWS_BEDROCKAGENT_API InferenceConfiguration(Aws::Utils::Json::JsonView jsonValue);
42 AWS_BEDROCKAGENT_API Aws::Utils::Json::JsonValue Jsonize() const;
43
44
46
49 inline int GetMaximumLength() const { return m_maximumLength; }
50 inline bool MaximumLengthHasBeenSet() const { return m_maximumLengthHasBeenSet; }
51 inline void SetMaximumLength(int value) { m_maximumLengthHasBeenSet = true; m_maximumLength = value; }
52 inline InferenceConfiguration& WithMaximumLength(int value) { SetMaximumLength(value); return *this;}
54
56
60 inline const Aws::Vector<Aws::String>& GetStopSequences() const { return m_stopSequences; }
61 inline bool StopSequencesHasBeenSet() const { return m_stopSequencesHasBeenSet; }
62 template<typename StopSequencesT = Aws::Vector<Aws::String>>
63 void SetStopSequences(StopSequencesT&& value) { m_stopSequencesHasBeenSet = true; m_stopSequences = std::forward<StopSequencesT>(value); }
64 template<typename StopSequencesT = Aws::Vector<Aws::String>>
65 InferenceConfiguration& WithStopSequences(StopSequencesT&& value) { SetStopSequences(std::forward<StopSequencesT>(value)); return *this;}
66 template<typename StopSequencesT = Aws::String>
67 InferenceConfiguration& AddStopSequences(StopSequencesT&& value) { m_stopSequencesHasBeenSet = true; m_stopSequences.emplace_back(std::forward<StopSequencesT>(value)); return *this; }
69
71
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
92 inline int GetTopK() const { return m_topK; }
93 inline bool TopKHasBeenSet() const { return m_topKHasBeenSet; }
94 inline void SetTopK(int value) { m_topKHasBeenSet = true; m_topK = value; }
95 inline InferenceConfiguration& WithTopK(int value) { SetTopK(value); return *this;}
97
99
107 inline double GetTopP() const { return m_topP; }
108 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
109 inline void SetTopP(double value) { m_topPHasBeenSet = true; m_topP = value; }
110 inline InferenceConfiguration& WithTopP(double value) { SetTopP(value); return *this;}
112 private:
113
114 int m_maximumLength{0};
115 bool m_maximumLengthHasBeenSet = false;
116
117 Aws::Vector<Aws::String> m_stopSequences;
118 bool m_stopSequencesHasBeenSet = false;
119
120 double m_temperature{0.0};
121 bool m_temperatureHasBeenSet = false;
122
123 int m_topK{0};
124 bool m_topKHasBeenSet = false;
125
126 double m_topP{0.0};
127 bool m_topPHasBeenSet = false;
128 };
129
130} // namespace Model
131} // namespace BedrockAgent
132} // 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::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue