AWS SDK for C++

AWS SDK for C++ Version 1.11.816

Loading...
Searching...
No Matches
InferenceConfiguration.h
1
6#pragma once
7#include <aws/bedrock/Bedrock_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 Bedrock {
21namespace Model {
22
31 public:
32 AWS_BEDROCK_API InferenceConfiguration() = default;
35 AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
42 inline int GetMaxTokens() const { return m_maxTokens; }
43 inline bool MaxTokensHasBeenSet() const { return m_maxTokensHasBeenSet; }
44 inline void SetMaxTokens(int value) {
45 m_maxTokensHasBeenSet = true;
46 m_maxTokens = value;
47 }
49 SetMaxTokens(value);
50 return *this;
51 }
53
55
61 inline double GetTemperature() const { return m_temperature; }
62 inline bool TemperatureHasBeenSet() const { return m_temperatureHasBeenSet; }
63 inline void SetTemperature(double value) {
64 m_temperatureHasBeenSet = true;
65 m_temperature = value;
66 }
68 SetTemperature(value);
69 return *this;
70 }
72
74
80 inline double GetTopP() const { return m_topP; }
81 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
82 inline void SetTopP(double value) {
83 m_topPHasBeenSet = true;
84 m_topP = value;
85 }
86 inline InferenceConfiguration& WithTopP(double value) {
87 SetTopP(value);
88 return *this;
89 }
91
93
97 inline const Aws::Vector<Aws::String>& GetStopSequences() const { return m_stopSequences; }
98 inline bool StopSequencesHasBeenSet() const { return m_stopSequencesHasBeenSet; }
99 template <typename StopSequencesT = Aws::Vector<Aws::String>>
101 m_stopSequencesHasBeenSet = true;
102 m_stopSequences = std::forward<StopSequencesT>(value);
103 }
104 template <typename StopSequencesT = Aws::Vector<Aws::String>>
106 SetStopSequences(std::forward<StopSequencesT>(value));
107 return *this;
108 }
109 template <typename StopSequencesT = Aws::String>
111 m_stopSequencesHasBeenSet = true;
112 m_stopSequences.emplace_back(std::forward<StopSequencesT>(value));
113 return *this;
114 }
116 private:
117 int m_maxTokens{0};
118
119 double m_temperature{0.0};
120
121 double m_topP{0.0};
122
123 Aws::Vector<Aws::String> m_stopSequences;
124 bool m_maxTokensHasBeenSet = false;
125 bool m_temperatureHasBeenSet = false;
126 bool m_topPHasBeenSet = false;
127 bool m_stopSequencesHasBeenSet = false;
128};
129
130} // namespace Model
131} // namespace Bedrock
132} // namespace Aws
AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_BEDROCK_API InferenceConfiguration()=default
const Aws::Vector< Aws::String > & GetStopSequences() const
InferenceConfiguration & WithTopP(double value)
AWS_BEDROCK_API InferenceConfiguration & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCK_API InferenceConfiguration(Aws::Utils::Json::JsonView jsonValue)
InferenceConfiguration & WithMaxTokens(int value)
InferenceConfiguration & WithStopSequences(StopSequencesT &&value)
InferenceConfiguration & WithTemperature(double value)
InferenceConfiguration & AddStopSequences(StopSequencesT &&value)
std::shared_ptr< T > MakeShared(const char *allocationTag, ArgTypes &&... args)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue