简体   繁体   English

跟进意图更新时出现Dialogflow INVALID_ARGUMENT错误

[英]Dialogflow INVALID_ARGUMENT error on followup intent update

When I call the API intents.patch ( https://dialogflow.com/docs/reference/api-v2/rest/v2/projects.agent.intents/patch ) on a followup intent using the Java SDK I receive the error: 当我使用Java SDK对后续意图调用API intents.patch( https://dialogflow.com/docs/reference/api-v2/rest/v2/projects.agent.intents/patch )时,收到错误消息:

INVALID_ARGUMENT: Read-only field 'root_followup_intent_name' cannot be set. INVALID_ARGUMENT:无法设置只读字段'root_followup_intent_name'。

The update request I make contains only the update of the intent training phrases (I use the update mask "training_phrases"), I'm not modifying the root followup intent. 我发出的更新请求仅包含意图培训短语的更新(我使用更新掩码“ training_phrases”),我没有修改根跟踪意图。

Calling the same API on a root intent has a success response. 在根意图上调用相同的API会获得成功响应。 This problem has arised only in the last few days, before it worked correctly also on followup intents. 这个问题仅在最近几天才出现,在按照预期目的正确解决之前也是如此。

Have you got any idea of the cause? 你知道原因吗?

Thank you. 谢谢。

The name attribute of the intent is a UUID defined by Dialogflow and cannot be changed (eg 718e3349-df8b-4d50-ac72-0de93198512a ). 意图的name属性是Dialogflow定义的UUID,无法更改(例如718e3349-df8b-4d50-ac72-0de93198512a )。 To update a training phrase you need to use an existing training phrase ID from calls like dialogflow.projects.agent.intents.list . 要更新训练短语,您需要使用来自诸如dialogflow.projects.agent.intents.list调用中的现有训练短语ID。 Here is an example of a valid dialogflow.projects.agent.intents.patch call: 这是一个有效的dialogflow.projects.agent.intents.patch调用的示例:

PATCH https://dialogflow.googleapis.com/v2/projects/stagent-f2236/agent/intents/c757e598-c44b-485f-bcb4-01c1b0110856?intentView=INTENT_VIEW_FULL&updateMask=trainingPhrases&fields=trainingPhrases
{
 "trainingPhrases": [
  {
   "name": "718e3349-df8b-4d50-ac72-0de93198512a",
   "parts": [
    {
     "text": "updated training phrase text"
    }
   ],
   "type": "EXAMPLE"
  }
 ]
}

Here is an API explorer example for the same dialogflow.projects.agent.intents.patch call. 这是相同的dialogflow.projects.agent.intents.patch调用的API资源管理器示例 Note you'll need to change the value of the project ID ( stagent-f2236 ) to your Dialogflow agent's project ID, the training phrase ID ( 718e3349-df8b-4d50-ac72-0de93198512a ) with the ID of the training phrase you'd like to change and the text ( updated training phrase text ) to the text you'd like to update the intent training phrase to. 请注意,您需要将项目ID( stagent-f2236 )的值更改为Dialogflow代理的项目ID,即训练短语ID( 718e3349-df8b-4d50-ac72-0de93198512a )和您想要的训练短语的ID想要更改,并将文本( updated training phrase text )更改为您想要将意图训练短语更新为的文本。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Unity 广告返回 INVALID_ARGUMENT - Unity ads returns INVALID_ARGUMENT “错误”:{“代码”:400,“消息”:“ RecognitionAudio未设置。”,“状态”:“ INVALID_ARGUMENT”}} - “error”: { “code”: 400, “message”: “RecognitionAudio not set.”, “status”: “INVALID_ARGUMENT” } } Simba][SpannerJDBCDriver](100300) 来自服务器的错误消息:INVALID_ARGUMENT:不支持位置参数 - Simba][SpannerJDBCDriver](100300) Error message from server: INVALID_ARGUMENT: Positional parameters are not supported Google Dataflow / Dataprep Shuffle键太大(INVALID_ARGUMENT) - Google Dataflow / Dataprep Shuffle key too large (INVALID_ARGUMENT) gcloud app deploy 命令错误 INVALID_ARGUMENT:此运行时需要 WEB-INF/appengine-web.xml - gcloud app deploy command error INVALID_ARGUMENT: WEB-INF/appengine-web.xml is required for this runtime 使用 IamCredentialsClient 对 Blob 进行签名时的 INVALID_ARGUMENT 响应 - INVALID_ARGUMENT response when signingBlob using IamCredentialsClient Apache Beam With GCP Dataflow 抛出 INVALID_ARGUMENT - Apache Beam With GCP Dataflow throws INVALID_ARGUMENT gcp 数据流模板,错误:(gcloud.beta.dataflow.jobs.run)INVALID_ARGUMENT:环境版本不支持作业类型 - gcp dataflow templates, ERROR: (gcloud.beta.dataflow.jobs.run) INVALID_ARGUMENT: There is no support for job type with environment version Google DocumentAI Java 示例因 io.grpc.StatusRuntimeException 失败:INVALID_ARGUMENT:请求包含无效参数 - Google DocumentAI Java example fails with io.grpc.StatusRuntimeException: INVALID_ARGUMENT: Request contains an invalid argument 尝试使用Google Cloud Vision时出现INVALID_ARGUMENT - I get INVALID_ARGUMENT when I try to use Google Cloud Vision
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM