AWS SDK for C++

AWS SDK for C++ Version 1.11.925

Loading...
Searching...
No Matches
SampleConfig.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/sagemakertrainingsessionruntime/SageMakerTrainingSessionRuntime_EXPORTS.h>
9#include <aws/sagemakertrainingsessionruntime/model/ModelInput.h>
10#include <aws/sagemakertrainingsessionruntime/model/SamplingParams.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace SageMakerTrainingSessionRuntime {
22namespace Model {
23
31 public:
32 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleConfig() = default;
33 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleConfig(Aws::Utils::Json::JsonView jsonValue);
34 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleConfig& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const ModelInput& GetPrompt() const { return m_prompt; }
42 inline bool PromptHasBeenSet() const { return m_promptHasBeenSet; }
43 template <typename PromptT = ModelInput>
44 void SetPrompt(PromptT&& value) {
45 m_promptHasBeenSet = true;
46 m_prompt = std::forward<PromptT>(value);
47 }
48 template <typename PromptT = ModelInput>
49 SampleConfig& WithPrompt(PromptT&& value) {
50 SetPrompt(std::forward<PromptT>(value));
51 return *this;
52 }
54
56
59 inline int GetNumSamples() const { return m_numSamples; }
60 inline bool NumSamplesHasBeenSet() const { return m_numSamplesHasBeenSet; }
61 inline void SetNumSamples(int value) {
62 m_numSamplesHasBeenSet = true;
63 m_numSamples = value;
64 }
65 inline SampleConfig& WithNumSamples(int value) {
66 SetNumSamples(value);
67 return *this;
68 }
70
72
75 inline const SamplingParams& GetSamplingParams() const { return m_samplingParams; }
76 inline bool SamplingParamsHasBeenSet() const { return m_samplingParamsHasBeenSet; }
77 template <typename SamplingParamsT = SamplingParams>
78 void SetSamplingParams(SamplingParamsT&& value) {
79 m_samplingParamsHasBeenSet = true;
80 m_samplingParams = std::forward<SamplingParamsT>(value);
81 }
82 template <typename SamplingParamsT = SamplingParams>
83 SampleConfig& WithSamplingParams(SamplingParamsT&& value) {
84 SetSamplingParams(std::forward<SamplingParamsT>(value));
85 return *this;
86 }
88
90
94 inline bool GetIncludePromptLogprobs() const { return m_includePromptLogprobs; }
95 inline bool IncludePromptLogprobsHasBeenSet() const { return m_includePromptLogprobsHasBeenSet; }
96 inline void SetIncludePromptLogprobs(bool value) {
97 m_includePromptLogprobsHasBeenSet = true;
98 m_includePromptLogprobs = value;
99 }
102 return *this;
103 }
105
107
110 inline int GetTopkPromptLogprobs() const { return m_topkPromptLogprobs; }
111 inline bool TopkPromptLogprobsHasBeenSet() const { return m_topkPromptLogprobsHasBeenSet; }
112 inline void SetTopkPromptLogprobs(int value) {
113 m_topkPromptLogprobsHasBeenSet = true;
114 m_topkPromptLogprobs = value;
115 }
118 return *this;
119 }
121
123
129 inline const Aws::String& GetModelPackageArn() const { return m_modelPackageArn; }
130 inline bool ModelPackageArnHasBeenSet() const { return m_modelPackageArnHasBeenSet; }
131 template <typename ModelPackageArnT = Aws::String>
132 void SetModelPackageArn(ModelPackageArnT&& value) {
133 m_modelPackageArnHasBeenSet = true;
134 m_modelPackageArn = std::forward<ModelPackageArnT>(value);
135 }
136 template <typename ModelPackageArnT = Aws::String>
137 SampleConfig& WithModelPackageArn(ModelPackageArnT&& value) {
138 SetModelPackageArn(std::forward<ModelPackageArnT>(value));
139 return *this;
140 }
142 private:
143 ModelInput m_prompt;
144
145 int m_numSamples{0};
146
147 SamplingParams m_samplingParams;
148
149 bool m_includePromptLogprobs{false};
150
151 int m_topkPromptLogprobs{0};
152
153 Aws::String m_modelPackageArn;
154 bool m_promptHasBeenSet = false;
155 bool m_numSamplesHasBeenSet = false;
156 bool m_samplingParamsHasBeenSet = false;
157 bool m_includePromptLogprobsHasBeenSet = false;
158 bool m_topkPromptLogprobsHasBeenSet = false;
159 bool m_modelPackageArnHasBeenSet = false;
160};
161
162} // namespace Model
163} // namespace SageMakerTrainingSessionRuntime
164} // namespace Aws
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleConfig(Aws::Utils::Json::JsonView jsonValue)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleConfig & operator=(Aws::Utils::Json::JsonView jsonValue)
SampleConfig & WithSamplingParams(SamplingParamsT &&value)
SampleConfig & WithModelPackageArn(ModelPackageArnT &&value)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleConfig()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue