[BindServiceMethod(typeof(Agents), "BindService")]
public abstract class AgentsBase
Base class for server-side implementations of Agents
Namespace
Google.Cloud.Dialogflow.V2Assembly
Google.Cloud.Dialogflow.V2.dll
Methods
DeleteAgent(DeleteAgentRequest, ServerCallContext)
public virtual Task<Empty> DeleteAgent(DeleteAgentRequest request, ServerCallContext context)
Deletes the specified agent.
Parameters | |
---|---|
Name | Description |
request | DeleteAgentRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Empty> | The response to send back to the client (wrapped by a task). |
ExportAgent(ExportAgentRequest, ServerCallContext)
public virtual Task<Operation> ExportAgent(ExportAgentRequest request, ServerCallContext context)
Exports the specified agent to a ZIP file.
Parameters | |
---|---|
Name | Description |
request | ExportAgentRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Operation> | The response to send back to the client (wrapped by a task). |
GetAgent(GetAgentRequest, ServerCallContext)
public virtual Task<Agent> GetAgent(GetAgentRequest request, ServerCallContext context)
Retrieves the specified agent.
Parameters | |
---|---|
Name | Description |
request | GetAgentRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Agent> | The response to send back to the client (wrapped by a task). |
GetValidationResult(GetValidationResultRequest, ServerCallContext)
public virtual Task<ValidationResult> GetValidationResult(GetValidationResultRequest request, ServerCallContext context)
Gets agent validation result. Agent validation is performed during training time and is updated automatically when training is completed.
Parameters | |
---|---|
Name | Description |
request | GetValidationResultRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<ValidationResult> | The response to send back to the client (wrapped by a task). |
ImportAgent(ImportAgentRequest, ServerCallContext)
public virtual Task<Operation> ImportAgent(ImportAgentRequest request, ServerCallContext context)
Imports the specified agent from a ZIP file.
Uploads new intents and entity types without deleting the existing ones. Intents and entity types with the same name are replaced with the new versions from [ImportAgentRequest][google.cloud.dialogflow.v2.ImportAgentRequest]. After the import, the imported draft agent will be trained automatically (unless disabled in agent settings). However, once the import is done, training may not be completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train explicitly.
An operation which tracks when importing is complete. It only tracks when the draft agent is updated not when it is done training.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | ImportAgentRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Operation> | The response to send back to the client (wrapped by a task). |
RestoreAgent(RestoreAgentRequest, ServerCallContext)
public virtual Task<Operation> RestoreAgent(RestoreAgentRequest request, ServerCallContext context)
Restores the specified agent from a ZIP file.
Replaces the current agent version with a new one. All the intents and entity types in the older version are deleted. After the restore, the restored draft agent will be trained automatically (unless disabled in agent settings). However, once the restore is done, training may not be completed yet. Please call [TrainAgent][google.cloud.dialogflow.v2.Agents.TrainAgent] and wait for the operation it returns in order to train explicitly.
An operation which tracks when restoring is complete. It only tracks when the draft agent is updated not when it is done training.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | RestoreAgentRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Operation> | The response to send back to the client (wrapped by a task). |
SearchAgents(SearchAgentsRequest, ServerCallContext)
public virtual Task<SearchAgentsResponse> SearchAgents(SearchAgentsRequest request, ServerCallContext context)
Returns the list of agents.
Since there is at most one conversational agent per project, this method is useful primarily for listing all agents across projects the caller has access to. One can achieve that with a wildcard project collection id "-". Refer to List Sub-Collections.
Parameters | |
---|---|
Name | Description |
request | SearchAgentsRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<SearchAgentsResponse> | The response to send back to the client (wrapped by a task). |
SetAgent(SetAgentRequest, ServerCallContext)
public virtual Task<Agent> SetAgent(SetAgentRequest request, ServerCallContext context)
Creates/updates the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | SetAgentRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Agent> | The response to send back to the client (wrapped by a task). |
TrainAgent(TrainAgentRequest, ServerCallContext)
public virtual Task<Operation> TrainAgent(TrainAgentRequest request, ServerCallContext context)
Trains the specified agent.
Note: You should always train an agent prior to sending it queries. See the training documentation.
Parameters | |
---|---|
Name | Description |
request | TrainAgentRequest The request received from the client. |
context | ServerCallContext The context of the server-side call handler being invoked. |
Returns | |
---|---|
Type | Description |
Task<Operation> | The response to send back to the client (wrapped by a task). |