const {AgentsClient, protos} = require('@google-cloud/dialogflow-cx');
const api_endpoint = `${location}-dialogflow.googleapis.com`;
const client = new AgentsClient({apiEndpoint: api_endpoint});
const exportAgentRequest =
new protos.google.cloud.dialogflow.cx.v3.ExportAgentRequest();
exportAgentRequest.name = `projects/${projectId}/locations/${location}/agents/${agentId}`;
// exportAgent call returns a promise to a long running operation
const [operation] = await client.exportAgent(exportAgentRequest);
// Waiting for the long running opporation to finish
const [response] = await operation.promise();
// Prints the result of the operation when the operation is done
console.log(response);
from google.cloud.dialogflowcx_v3.services.agents.client import AgentsClient
from google.cloud.dialogflowcx_v3.types.agent import ExportAgentRequest
def export_long_running_agent(project_id, agent_id, location):
api_endpoint = f"{location}-dialogflow.googleapis.com:443"
client_options = {"api_endpoint": api_endpoint}
agents_client = AgentsClient(client_options=client_options)
export_request = ExportAgentRequest()
export_request.name = (
f"projects/{project_id}/locations/{location}/agents/{agent_id}"
)
# export_agent returns a long running operation
operation = agents_client.export_agent(request=export_request)
# Returns the result of the operation when the operation is done
return operation.result()
[[["わかりやすい","easyToUnderstand","thumb-up"],["問題の解決に役立った","solvedMyProblem","thumb-up"],["その他","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["翻訳に関する問題","translationIssue","thumb-down"],["その他","otherDown","thumb-down"]],["最終更新日 2024-08-23 UTC。"],[],[]]