1

我是一名护理专业的学生,​​试图使用 NLP API 来了解医院患者对他们的经历的看法。我正在尝试通过其 HTTP 连接器选项在 Microsoft 的 Power Automate 中使用 NLP API,但我不知道如何正确配置连接器。

Google 的文档页面显示了以下示例:

curl -X POST \
     -H "Authorization: Bearer "$(gcloud auth application-default print-access-token) \
     -H "Content-Type: application/json; charset=utf-8" \
     --data "{
  'encodingType': 'UTF8',
  'document': {
    'type': 'PLAIN_TEXT',
    'content': 'Enjoy your vacation!'
  }
}" "https://language.googleapis.com/v1/documents:analyzeSentiment"

https://cloud.google.com/natural-language/docs/analyzing-sentiment#language-sentiment-string-protocol

我有一个有效的 API 密钥,但我不确定如何将它传递到 Microsoft 的 HTTP 连接器。

Microsoft HTTP 连接器

如何设置连接器以调用 Google 自然语言 API 并返回情绪分数?

谷歌的文档显示这是一个成功的回报:

{
  "documentSentiment": {
    "magnitude": 0.8,
    "score": 0.8
  },
  "language": "en",
  "sentences": [
    {
      "text": {
        "content": "Enjoy your vacation!",
        "beginOffset": 0
      },
      "sentiment": {
        "magnitude": 0.8,
        "score": 0.8
      }
    }
  ]
}
4

0 回答 0