This shows how to override the retry policies for dialogflow_es::ConversationModelsClient:
auto options =
.
set<google::cloud::dialogflow_es::
ConversationModelsConnectionIdempotencyPolicyOption>(
CustomIdempotencyPolicy().clone())
ConversationModelsRetryPolicyOption>(
ConversationModelsLimitedErrorCountRetryPolicy(3)
.clone())
ConversationModelsBackoffPolicyOption>(
std::chrono::milliseconds(200),
std::chrono::seconds(45),
2.0)
.clone());
auto connection =
.
set<google::cloud::dialogflow_es::
ConversationModelsRetryPolicyOption>(
std::chrono::minutes(5))
.clone()));
Options & set(ValueTypeT< T > v)
Manages a collection of models for human agent assistant.
Definition: conversation_models_client.h:62
Definition: agents_client.h:33
std::shared_ptr< ConversationModelsConnection > MakeConversationModelsConnection(std::string const &location, Options options={})
A factory function to construct an object of type ConversationModelsConnection.
::google::cloud::internal::LimitedTimeRetryPolicy< dialogflow_es_internal::ConversationModelsRetryTraits > ConversationModelsLimitedTimeRetryPolicy
Definition: conversation_models_connection.h:47
google::cloud::internal::ExponentialBackoffPolicy ExponentialBackoffPolicy
Assuming you have created a custom idempotency policy. Such as:
class CustomIdempotencyPolicy
ConversationModelsConnectionIdempotencyPolicy {
public:
~CustomIdempotencyPolicy() override = default;
std::unique_ptr<google::cloud::dialogflow_es::
ConversationModelsConnectionIdempotencyPolicy>
clone() const override {
return std::make_unique<CustomIdempotencyPolicy>(*this);
}
};