9阅网

您现在的位置是:首页 > 知识 > 正文

知识

google-cloud-platform - Neoj4 GCP错误。在本服务器上找不到请求的URL v1documents:classifyText?key=apiKey

admin2022-11-07知识16

我想知道如何用Neoj4 Desktop来处理NLP的问题,用这个方法 博客. 一切都很好,直到文本分类时刻。

CALL apoc.periodic.iterate("
// get all articles
   MATCH (node:Article) RETURN node
  ","
   // classify each article
   CALL apoc.nlp.gcp.classify.graph(node, {
       // we retrieve gcp api key from static value storage
       key: apoc.static.get('gcp.apiKey'),
       // node property that contains the text
       nodeProperty: 'content',
       write:true
    }) YIELD graph RETURN distinct 'done'",
    {batchSize:10})

它没有返回类别,而是返回 "The requested URL v1documents:classifyText?key=apiKey was not found on this server "错误。

也许是GCP证书的问题,但我已经按照建议做了一切。



【回答】:

谢谢你阅读我的博客文章! :)

请尝试以下命令。

RETURN apoc.static.get('gcp.apiKey')

它是否返回任何东西?它应该返回你的谷歌API密钥。如果它不工作,你总是可以尝试复制你的API密钥到查询中。另一方面,如果 apoc.static.get 的工作原理,也许可以尝试 启用您的自然语言API 在谷歌控制台。这可能是一个问题。