AWS SDK for C++

AWS SDK for C++ Version 1.11.925

Loading...
Searching...
No Matches
SampleResponse.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSVector.h>
8#include <aws/sagemakertrainingsessionruntime/SageMakerTrainingSessionRuntime_EXPORTS.h>
9#include <aws/sagemakertrainingsessionruntime/model/SampledSequence.h>
10#include <aws/sagemakertrainingsessionruntime/model/TokenLogprob.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 SampleResponse() = default;
33 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleResponse(Aws::Utils::Json::JsonView jsonValue);
34 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleResponse& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::Vector<SampledSequence>& GetSequences() const { return m_sequences; }
42 inline bool SequencesHasBeenSet() const { return m_sequencesHasBeenSet; }
43 template <typename SequencesT = Aws::Vector<SampledSequence>>
44 void SetSequences(SequencesT&& value) {
45 m_sequencesHasBeenSet = true;
46 m_sequences = std::forward<SequencesT>(value);
47 }
48 template <typename SequencesT = Aws::Vector<SampledSequence>>
49 SampleResponse& WithSequences(SequencesT&& value) {
50 SetSequences(std::forward<SequencesT>(value));
51 return *this;
52 }
53 template <typename SequencesT = SampledSequence>
54 SampleResponse& AddSequences(SequencesT&& value) {
55 m_sequencesHasBeenSet = true;
56 m_sequences.emplace_back(std::forward<SequencesT>(value));
57 return *this;
58 }
60
62
66 inline const Aws::Vector<double>& GetPromptLogprobs() const { return m_promptLogprobs; }
67 inline bool PromptLogprobsHasBeenSet() const { return m_promptLogprobsHasBeenSet; }
68 template <typename PromptLogprobsT = Aws::Vector<double>>
69 void SetPromptLogprobs(PromptLogprobsT&& value) {
70 m_promptLogprobsHasBeenSet = true;
71 m_promptLogprobs = std::forward<PromptLogprobsT>(value);
72 }
73 template <typename PromptLogprobsT = Aws::Vector<double>>
74 SampleResponse& WithPromptLogprobs(PromptLogprobsT&& value) {
75 SetPromptLogprobs(std::forward<PromptLogprobsT>(value));
76 return *this;
77 }
78 inline SampleResponse& AddPromptLogprobs(double value) {
79 m_promptLogprobsHasBeenSet = true;
80 m_promptLogprobs.push_back(value);
81 return *this;
82 }
84
86
90 inline const Aws::Vector<Aws::Vector<TokenLogprob>>& GetTopkPromptLogprobs() const { return m_topkPromptLogprobs; }
91 inline bool TopkPromptLogprobsHasBeenSet() const { return m_topkPromptLogprobsHasBeenSet; }
92 template <typename TopkPromptLogprobsT = Aws::Vector<Aws::Vector<TokenLogprob>>>
93 void SetTopkPromptLogprobs(TopkPromptLogprobsT&& value) {
94 m_topkPromptLogprobsHasBeenSet = true;
95 m_topkPromptLogprobs = std::forward<TopkPromptLogprobsT>(value);
96 }
97 template <typename TopkPromptLogprobsT = Aws::Vector<Aws::Vector<TokenLogprob>>>
98 SampleResponse& WithTopkPromptLogprobs(TopkPromptLogprobsT&& value) {
99 SetTopkPromptLogprobs(std::forward<TopkPromptLogprobsT>(value));
100 return *this;
101 }
102 template <typename TopkPromptLogprobsT = Aws::Vector<TokenLogprob>>
103 SampleResponse& AddTopkPromptLogprobs(TopkPromptLogprobsT&& value) {
104 m_topkPromptLogprobsHasBeenSet = true;
105 m_topkPromptLogprobs.emplace_back(std::forward<TopkPromptLogprobsT>(value));
106 return *this;
107 }
109 private:
111
112 Aws::Vector<double> m_promptLogprobs;
113
114 Aws::Vector<Aws::Vector<TokenLogprob>> m_topkPromptLogprobs;
115 bool m_sequencesHasBeenSet = false;
116 bool m_promptLogprobsHasBeenSet = false;
117 bool m_topkPromptLogprobsHasBeenSet = false;
118};
119
120} // namespace Model
121} // namespace SageMakerTrainingSessionRuntime
122} // namespace Aws
SampleResponse & WithPromptLogprobs(PromptLogprobsT &&value)
const Aws::Vector< double > & GetPromptLogprobs() const
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleResponse & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< SampledSequence > & GetSequences() const
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleResponse(Aws::Utils::Json::JsonView jsonValue)
const Aws::Vector< Aws::Vector< TokenLogprob > > & GetTopkPromptLogprobs() const
SampleResponse & WithTopkPromptLogprobs(TopkPromptLogprobsT &&value)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API Aws::Utils::Json::JsonValue Jsonize() const
SampleResponse & AddTopkPromptLogprobs(TopkPromptLogprobsT &&value)
AWS_SAGEMAKERTRAININGSESSIONRUNTIME_API SampleResponse()=default
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue