如何比其他标签更喜欢 json 标签

how to prefer json tag over other tags

{"intents": [
      {"tag": "name",
        "patterns": ["Hi", "How are you", "Is anyone there?", "Hello", "yes", "yeah", "can you help 
                      me"],
        "responses": ["hello! i am bot here to help you, whats your name"],
        "context_set": ""
      },

    {"tag": "age",
        "patterns": ["name is",],
        "responses": ["what is your age?"],
        "context_set": ""
      },

    {"tag": "dept",
        "patterns": ["age is"],
        "responses": ["which department you're looking for?"],
        "context_set": ""
      }
]}

嘿,我是 python 的新手,想制作一个机器人。我正在使用一个 json 意图文件来保存响应和模式,问题是我只想问 3 个问题 1.name 2.age 3.department,但我想要我的 json 文件包含所有其他细节,如时间和其他相关内容,但我想优先考虑这 3 个问题而不是其他问题我该怎么做? 第二个问题是在 运行.

时什么样的神经网络会帮助这个机器人学习

JSON没有偏好。 您必须执行命令。

您是指用于生成 JSON 的 dictionary/key 对中的首选项吗?

如果是,您可以参考此 link 了解如何使用自定义函数在 python 字典中强制执行强制键: Dictionary with some mandatory keys as function input