AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
TextInferenceConfig.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 TextInferenceConfig() = default;
39 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
40
42
48 inline int GetMaxTokens() const { return m_maxTokens; }
49 inline bool MaxTokensHasBeenSet() const { return m_maxTokensHasBeenSet; }
50 inline void SetMaxTokens(int value) {
51 m_maxTokensHasBeenSet = true;
52 m_maxTokens = value;
53 }
55 SetMaxTokens(value);
56 return *this;
57 }
59
61
67 inline const Aws::Vector<Aws::String>& GetStopSequences() const { return m_stopSequences; }
68 inline bool StopSequencesHasBeenSet() const { return m_stopSequencesHasBeenSet; }
69 template <typename StopSequencesT = Aws::Vector<Aws::String>>
71 m_stopSequencesHasBeenSet = true;
72 m_stopSequences = std::forward<StopSequencesT>(value);
73 }
74 template <typename StopSequencesT = Aws::Vector<Aws::String>>
76 SetStopSequences(std::forward<StopSequencesT>(value));
77 return *this;
78 }
79 template <typename StopSequencesT = Aws::String>
81 m_stopSequencesHasBeenSet = true;
82 m_stopSequences.emplace_back(std::forward<StopSequencesT>(value));
83 return *this;
84 }
86
88
96 inline double GetTemperature() const { return m_temperature; }
97 inline bool TemperatureHasBeenSet() const { return m_temperatureHasBeenSet; }
98 inline void SetTemperature(double value) {
99 m_temperatureHasBeenSet = true;
100 m_temperature = value;
101 }
102 inline TextInferenceConfig& WithTemperature(double value) {
103 SetTemperature(value);
104 return *this;
105 }
107
109
114 inline double GetTopP() const { return m_topP; }
115 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
116 inline void SetTopP(double value) {
117 m_topPHasBeenSet = true;
118 m_topP = value;
119 }
120 inline TextInferenceConfig& WithTopP(double value) {
121 SetTopP(value);
122 return *this;
123 }
125 private:
126 int m_maxTokens{0};
127
128 Aws::Vector<Aws::String> m_stopSequences;
129
130 double m_temperature{0.0};
131
132 double m_topP{0.0};
133 bool m_maxTokensHasBeenSet = false;
134 bool m_stopSequencesHasBeenSet = false;
135 bool m_temperatureHasBeenSet = false;
136 bool m_topPHasBeenSet = false;
137};
138
139} // namespace Model
140} // namespace BedrockAgentRuntime
141} // namespace Aws
TextInferenceConfig & AddStopSequences(StopSequencesT &&value)
AWS_BEDROCKAGENTRUNTIME_API TextInferenceConfig(Aws::Utils::Json::JsonView jsonValue)
AWS_BEDROCKAGENTRUNTIME_API TextInferenceConfig()=default
AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
TextInferenceConfig & WithStopSequences(StopSequencesT &&value)
const Aws::Vector< Aws::String > & GetStopSequences() const
AWS_BEDROCKAGENTRUNTIME_API TextInferenceConfig & operator=(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