AWS SDK for C++

AWS SDK for C++ Version 1.11.759

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/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 BedrockAgentRuntime {
21namespace Model {
22
35 public:
36 AWS_BEDROCKAGENTRUNTIME_API InferenceConfiguration() = default;
39 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
45 inline int GetMaximumLength() const { return m_maximumLength; }
46 inline bool MaximumLengthHasBeenSet() const { return m_maximumLengthHasBeenSet; }
47 inline void SetMaximumLength(int value) {
48 m_maximumLengthHasBeenSet = true;
49 m_maximumLength = value;
50 }
52 SetMaximumLength(value);
53 return *this;
54 }
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>>
66 m_stopSequencesHasBeenSet = true;
67 m_stopSequences = std::forward<StopSequencesT>(value);
68 }
69 template <typename StopSequencesT = Aws::Vector<Aws::String>>
71 SetStopSequences(std::forward<StopSequencesT>(value));
72 return *this;
73 }
74 template <typename StopSequencesT = Aws::String>
76 m_stopSequencesHasBeenSet = true;
77 m_stopSequences.emplace_back(std::forward<StopSequencesT>(value));
78 return *this;
79 }
81
83
89 inline double GetTemperature() const { return m_temperature; }
90 inline bool TemperatureHasBeenSet() const { return m_temperatureHasBeenSet; }
91 inline void SetTemperature(double value) {
92 m_temperatureHasBeenSet = true;
93 m_temperature = value;
94 }
96 SetTemperature(value);
97 return *this;
98 }
100
102
110 inline int GetTopK() const { return m_topK; }
111 inline bool TopKHasBeenSet() const { return m_topKHasBeenSet; }
112 inline void SetTopK(int value) {
113 m_topKHasBeenSet = true;
114 m_topK = value;
115 }
116 inline InferenceConfiguration& WithTopK(int value) {
117 SetTopK(value);
118 return *this;
119 }
121
123
131 inline double GetTopP() const { return m_topP; }
132 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
133 inline void SetTopP(double value) {
134 m_topPHasBeenSet = true;
135 m_topP = value;
136 }
137 inline InferenceConfiguration& WithTopP(double value) {
138 SetTopP(value);
139 return *this;
140 }
142 private:
143 int m_maximumLength{0};
144
145 Aws::Vector<Aws::String> m_stopSequences;
146
147 double m_temperature{0.0};
148
149 int m_topK{0};
150
151 double m_topP{0.0};
152 bool m_maximumLengthHasBeenSet = false;
153 bool m_stopSequencesHasBeenSet = false;
154 bool m_temperatureHasBeenSet = false;
155 bool m_topKHasBeenSet = false;
156 bool m_topPHasBeenSet = false;
157};
158
159} // namespace Model
160} // namespace BedrockAgentRuntime
161} // 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::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue