Home > other >  Error: 3 INVALID_ARGUMENT: com.google.apps.framework.request.BadRequestException: Agent does not sup
Error: 3 INVALID_ARGUMENT: com.google.apps.framework.request.BadRequestException: Agent does not sup

Time:07-27

I try to fix error. and research in two hours. does anyone found error like this. Thank you.

I try to connect backend node js to dialogflow to make conversation session

'batchUpdate()' problem dialogflow

    } else {
      event.contents.forEach((content: IDialogContent) => {
        const intent: IIntent = {
          name: content.intent.intentId,
          displayName: content.intent.intentName,
          webhookState: 0,
          inputContextNames: [
            `projects/${projectId}/agent/sessions/${sessionId}/contexts/disable`,
          ],
          outputContexts: [],
        };
        intents.push(intent);
      });
    }
  });
  const finalResult = await batchUpdate(projectId, intents)
^^^^^^^^^^^^^^^^^^^^^^problem this line
  return finalResult;
};

error like this

    Error: 3 INVALID_ARGUMENT: com.google.apps.framework.request.BadRequestException: Agent does not support language: 'pl'.
    at Object.callErrorFromStatus (/app/node_modules/@grpc/grpc-js/src/call.ts:81:24)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/src/client.ts:338:36)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/src/client-interceptors.ts:426:34)
    at Object.onReceiveStatus (/app/node_modules/@grpc/grpc-js/src/client-interceptors.ts:389:48)
    at /app/node_modules/@grpc/grpc-js/src/call-stream.ts:276:24
    at processTicksAndRejections (internal/process/task_queues.js:75:11) {
  code: 3,
  details: "com.google.apps.framework.request.BadRequestException: Agent does not support language: 'pl'.",
  metadata: Metadata {
    internalRepr: Map(1) { 'grpc-server-stats-bin' => [Array] },
    options: {}
  },
  note: 'Exception occurred in retry method that was not classified as transient'
}

CodePudding user response:

looks like you are sending an intent detection request for a language that the agent is not configured to use.

take a look at https://dialogflow.cloud.google.com/#/editAgent/<your agent name>/ and check if Polish is included as a supported language. If it is not and you need it, just click on "Select Additional Language", select Polish from the list and click "Save".

  • Related