AWS SDK for C++

AWS SDK for C++ Version 1.11.607

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/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 TextInferenceConfig() = default;
42 AWS_BEDROCKAGENTRUNTIME_API TextInferenceConfig(Aws::Utils::Json::JsonView jsonValue);
43 AWS_BEDROCKAGENTRUNTIME_API TextInferenceConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
44 AWS_BEDROCKAGENTRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
45
46
48
54 inline int GetMaxTokens() const { return m_maxTokens; }
55 inline bool MaxTokensHasBeenSet() const { return m_maxTokensHasBeenSet; }
56 inline void SetMaxTokens(int value) { m_maxTokensHasBeenSet = true; m_maxTokens = value; }
57 inline TextInferenceConfig& WithMaxTokens(int value) { SetMaxTokens(value); return *this;}
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>>
70 void SetStopSequences(StopSequencesT&& value) { m_stopSequencesHasBeenSet = true; m_stopSequences = std::forward<StopSequencesT>(value); }
71 template<typename StopSequencesT = Aws::Vector<Aws::String>>
72 TextInferenceConfig& WithStopSequences(StopSequencesT&& value) { SetStopSequences(std::forward<StopSequencesT>(value)); return *this;}
73 template<typename StopSequencesT = Aws::String>
74 TextInferenceConfig& AddStopSequences(StopSequencesT&& value) { m_stopSequencesHasBeenSet = true; m_stopSequences.emplace_back(std::forward<StopSequencesT>(value)); return *this; }
76
78
86 inline double GetTemperature() const { return m_temperature; }
87 inline bool TemperatureHasBeenSet() const { return m_temperatureHasBeenSet; }
88 inline void SetTemperature(double value) { m_temperatureHasBeenSet = true; m_temperature = value; }
89 inline TextInferenceConfig& WithTemperature(double value) { SetTemperature(value); return *this;}
91
93
98 inline double GetTopP() const { return m_topP; }
99 inline bool TopPHasBeenSet() const { return m_topPHasBeenSet; }
100 inline void SetTopP(double value) { m_topPHasBeenSet = true; m_topP = value; }
101 inline TextInferenceConfig& WithTopP(double value) { SetTopP(value); return *this;}
103 private:
104
105 int m_maxTokens{0};
106 bool m_maxTokensHasBeenSet = false;
107
108 Aws::Vector<Aws::String> m_stopSequences;
109 bool m_stopSequencesHasBeenSet = false;
110
111 double m_temperature{0.0};
112 bool m_temperatureHasBeenSet = false;
113
114 double m_topP{0.0};
115 bool m_topPHasBeenSet = false;
116 };
117
118} // namespace Model
119} // namespace BedrockAgentRuntime
120} // 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)
TextInferenceConfig & WithTemperature(double value)
const Aws::Vector< Aws::String > & GetStopSequences() const
AWS_BEDROCKAGENTRUNTIME_API TextInferenceConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue