pub struct ConversationModels { /* private fields */ }conversation-models only.Expand description
Implements a client for the Dialogflow API.
§Example
let client = ConversationModels::builder().build().await?;
// use `client` to make requests to the Dialogflow API.§Service Description
Manages a collection of models for human agent assistant.
§Configuration
To configure ConversationModels use the with_* methods in the type returned
by builder(). The default configuration should
work for most applications. Common configuration changes include
- with_endpoint(): by default this client uses the global default endpoint
(
https://dialogflow.googleapis.com). Applications using regional endpoints or running in restricted networks (e.g. a network configured override this default. - with_credentials(): by default this client uses Application Default Credentials. Applications using custom authentication may need to override this default.
§Pooling and Cloning
ConversationModels holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap ConversationModels in
an Rc or Arc to reuse it, because it
already uses an Arc internally.
Implementations§
Source§impl ConversationModels
impl ConversationModels
Sourcepub fn builder() -> ClientBuilder
pub fn builder() -> ClientBuilder
Returns a builder for ConversationModels.
let client = ConversationModels::builder().build().await?;Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: ConversationModels + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: ConversationModels + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is in tests mocking the client’s behavior.
Sourcepub fn create_conversation_model(&self) -> CreateConversationModel
pub fn create_conversation_model(&self) -> CreateConversationModel
Creates a model.
This method is a long-running
operation.
The returned Operation type has the following method-specific fields:
metadata: CreateConversationModelOperationMetadataresponse: ConversationModel
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn get_conversation_model(&self) -> GetConversationModel
pub fn get_conversation_model(&self) -> GetConversationModel
Gets conversation model.
Sourcepub fn list_conversation_models(&self) -> ListConversationModels
pub fn list_conversation_models(&self) -> ListConversationModels
Lists conversation models.
Sourcepub fn delete_conversation_model(&self) -> DeleteConversationModel
pub fn delete_conversation_model(&self) -> DeleteConversationModel
Deletes a model.
This method is a long-running
operation.
The returned Operation type has the following method-specific fields:
metadata: DeleteConversationModelOperationMetadataresponse: An Empty message
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn deploy_conversation_model(&self) -> DeployConversationModel
pub fn deploy_conversation_model(&self) -> DeployConversationModel
Deploys a model. If a model is already deployed, deploying it has no effect. A model can only serve prediction requests after it gets deployed. For article suggestion, custom model will not be used unless it is deployed.
This method is a long-running
operation.
The returned Operation type has the following method-specific fields:
metadata: DeployConversationModelOperationMetadataresponse: An Empty message
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn undeploy_conversation_model(&self) -> UndeployConversationModel
pub fn undeploy_conversation_model(&self) -> UndeployConversationModel
Undeploys a model. If the model is not deployed this method has no effect. If the model is currently being used:
- For article suggestion, article suggestion will fallback to the default model if model is undeployed.
This method is a long-running
operation.
The returned Operation type has the following method-specific fields:
metadata: UndeployConversationModelOperationMetadataresponse: An Empty message
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn get_conversation_model_evaluation(
&self,
) -> GetConversationModelEvaluation
pub fn get_conversation_model_evaluation( &self, ) -> GetConversationModelEvaluation
Gets an evaluation of conversation model.
Sourcepub fn list_conversation_model_evaluations(
&self,
) -> ListConversationModelEvaluations
pub fn list_conversation_model_evaluations( &self, ) -> ListConversationModelEvaluations
Lists evaluations of a conversation model.
Sourcepub fn create_conversation_model_evaluation(
&self,
) -> CreateConversationModelEvaluation
pub fn create_conversation_model_evaluation( &self, ) -> CreateConversationModelEvaluation
Creates evaluation of a conversation model.
§Long running operations
This method is used to start, and/or poll a long-running Operation. The Working with long-running operations chapter in the user guide covers these operations in detail.
Sourcepub fn list_locations(&self) -> ListLocations
pub fn list_locations(&self) -> ListLocations
Lists information about the supported locations for this service.
Sourcepub fn get_location(&self) -> GetLocation
pub fn get_location(&self) -> GetLocation
Gets information about a location.
Sourcepub fn list_operations(&self) -> ListOperations
pub fn list_operations(&self) -> ListOperations
Provides the Operations service functionality in this service.
Sourcepub fn get_operation(&self) -> GetOperation
pub fn get_operation(&self) -> GetOperation
Provides the Operations service functionality in this service.
Sourcepub fn cancel_operation(&self) -> CancelOperation
pub fn cancel_operation(&self) -> CancelOperation
Provides the Operations service functionality in this service.
Trait Implementations§
Source§impl Clone for ConversationModels
impl Clone for ConversationModels
Source§fn clone(&self) -> ConversationModels
fn clone(&self) -> ConversationModels
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more