AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
InferenceConfiguration.h
1
6#pragma once
7#include <aws/bedrock-agent-runtime/BedrockAgentRuntime_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 BedrockAgentRuntime
23{
24namespace Model
25{
26
39 {
40 public:
41 AWS_BEDROCKAGENTRUNTIME_API InferenceConfiguration() = default;
42 AWS_BEDROCKAGENTRUNTIME_API InferenceConfiguration(Aws::Utils::Json::JsonView jsonValue);
43 AWS_BEDROCKAGENTRUNTIME_API InferenceConfiguration& operator=(Aws::Utils::Json::JsonView jsonValue);
44 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
45
46
48
51 inline int GetMaximumLength() const { return m_maximumLength; }
52 inline bool MaximumLengthHasBeenSet() const { return m_maximumLengthHasBeenSet; }
53 inline void SetMaximumLength(int value) { m_maximumLengthHasBeenSet = true; m_maximumLength = value; }
54 inline InferenceConfiguration& WithMaximumLength(int value) { SetMaximumLength(value); return *this;}
56
58
62 inline const Aws::Vector<Aws::String>& GetStopSequences() const { return m_stopSequences; }
63 inline bool StopSequencesHasBeenSet() const { return m_stopSequencesHasBeenSet; }
64 template<typename StopSequencesT = Aws::Vector<Aws::String>>
65 void SetStopSequences(StopSequencesT&& value) { m_stopSequencesHasBeenSet = true; m_stopSequences = std::forward<StopSequencesT>(value); }
66 template<typename StopSequencesT = Aws::Vector<Aws::String>>
67 InferenceConfiguration& WithStopSequences(StopSequencesT&& value) { SetStopSequences(std::forward<StopSequencesT>(value)); return *this;}
68 template<typename StopSequencesT = Aws::String>
69 InferenceConfiguration& AddStopSequences(StopSequencesT&& value) { m_stopSequencesHasBeenSet = true; m_stopSequences.emplace_back(std::forward<StopSequencesT>(value)); return *this; }
71
73
79 inline double GetTemperature() const { return m_temperature; }
80 inline bool TemperatureHasBeenSet() const { return m_temperatureHasBeenSet; }
81 inline void SetTemperature(double value) { m_temperatureHasBeenSet = true; m_temperature = value; }
82 inline InferenceConfiguration& WithTemperature(double value) { SetTemperature(value); return *this;}
84
86
94 inline int GetTopK() const { return m_topK; }
95 inline bool TopKHasBeenSet() const { return m_topKHasBeenSet; }
96 inline void SetTopK(int value) { m_topKHasBeenSet = true; m_topK = value; }
97 inline InferenceConfiguration& WithTopK(int value) { SetTopK(value); return *this;}
99
101
109 inline double GetTopP() const { return m_topP; }
110 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
111 inline void SetTopP(double value) { m_topPHasBeenSet = true; m_topP = value; }
112 inline InferenceConfiguration& WithTopP(double value) { SetTopP(value); return *this;}
114 private:
115
116 int m_maximumLength{0};
117 bool m_maximumLengthHasBeenSet = false;
118
119 Aws::Vector<Aws::String> m_stopSequences;
120 bool m_stopSequencesHasBeenSet = false;
121
122 double m_temperature{0.0};
123 bool m_temperatureHasBeenSet = false;
124
125 int m_topK{0};
126 bool m_topKHasBeenSet = false;
127
128 double m_topP{0.0};
129 bool m_topPHasBeenSet = false;
130 };
131
132} // namespace Model
133} // namespace BedrockAgentRuntime
134} // namespace Aws
InferenceConfiguration & AddStopSequences(StopSequencesT &&value)
InferenceConfiguration & WithStopSequences(StopSequencesT &&value)
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< Aws::String > & GetStopSequences() const
AWS_BEDROCKAGENTRUNTIME_API InferenceConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKAGENTRUNTIME_API InferenceConfiguration()=default
AWS_BEDROCKAGENTRUNTIME_API InferenceConfiguration(Aws::Utils::Json::JsonView jsonValue)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue