AWS SDK for C++

AWS SDK for C++ Version 1.11.748

Loading...
Searching...
No Matches
TextInferenceConfig.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
30 public:
31 AWS_BEDROCK_API TextInferenceConfig() = default;
34 AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const;
35
37
44 inline double GetTemperature() const { return m_temperature; }
45 inline bool TemperatureHasBeenSet() const { return m_temperatureHasBeenSet; }
46 inline void SetTemperature(double value) {
47 m_temperatureHasBeenSet = true;
48 m_temperature = value;
49 }
50 inline TextInferenceConfig& WithTemperature(double value) {
51 SetTemperature(value);
52 return *this;
53 }
55
57
62 inline double GetTopP() const { return m_topP; }
63 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
64 inline void SetTopP(double value) {
65 m_topPHasBeenSet = true;
66 m_topP = value;
67 }
68 inline TextInferenceConfig& WithTopP(double value) {
69 SetTopP(value);
70 return *this;
71 }
73
75
81 inline int GetMaxTokens() const { return m_maxTokens; }
82 inline bool MaxTokensHasBeenSet() const { return m_maxTokensHasBeenSet; }
83 inline void SetMaxTokens(int value) {
84 m_maxTokensHasBeenSet = true;
85 m_maxTokens = value;
86 }
88 SetMaxTokens(value);
89 return *this;
90 }
92
94
100 inline const Aws::Vector<Aws::String>& GetStopSequences() const { return m_stopSequences; }
101 inline bool StopSequencesHasBeenSet() const { return m_stopSequencesHasBeenSet; }
102 template <typename StopSequencesT = Aws::Vector<Aws::String>>
104 m_stopSequencesHasBeenSet = true;
105 m_stopSequences = std::forward<StopSequencesT>(value);
106 }
107 template <typename StopSequencesT = Aws::Vector<Aws::String>>
109 SetStopSequences(std::forward<StopSequencesT>(value));
110 return *this;
111 }
112 template <typename StopSequencesT = Aws::String>
114 m_stopSequencesHasBeenSet = true;
115 m_stopSequences.emplace_back(std::forward<StopSequencesT>(value));
116 return *this;
117 }
119 private:
120 double m_temperature{0.0};
121
122 double m_topP{0.0};
123
124 int m_maxTokens{0};
125
126 Aws::Vector<Aws::String> m_stopSequences;
127 bool m_temperatureHasBeenSet = false;
128 bool m_topPHasBeenSet = false;
129 bool m_maxTokensHasBeenSet = false;
130 bool m_stopSequencesHasBeenSet = false;
131};
132
133} // namespace Model
134} // namespace Bedrock
135} // namespace Aws
const Aws::Vector< Aws::String > & GetStopSequences() const
TextInferenceConfig & WithTemperature(double value)
TextInferenceConfig & WithTopP(double value)
TextInferenceConfig & WithMaxTokens(int value)
AWS_BEDROCK_API TextInferenceConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetStopSequences(StopSequencesT &&value)
TextInferenceConfig & AddStopSequences(StopSequencesT &&value)
TextInferenceConfig & WithStopSequences(StopSequencesT &&value)
AWS_BEDROCK_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_BEDROCK_API TextInferenceConfig()=default
AWS_BEDROCK_API TextInferenceConfig(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