cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Apoc nlp functions for azure cognitive services are not working

vtc87
Node Link

Hi,
The apoc nlp functions for the azure cognitive services api are returning an error, with the exception of the ones concerning sentiment analysis (as far as I know). The error obtained is the following:
"Failed to invoke procedure apoc.nlp.azure.entities.stream: Caused by: java.io.IOException: Server returned HTTP response code: 400 for URL: https://xxxxx.cognitiveservices.azure.com/text/analytics/v2.1/entities"
This happens for the entitity and keyphrases related apis.

The same issue does not occur when using the google cloud services api functions, which work fine. Also, the fact that the sentiment analysis api function for azure works, leads me to think that authentication or connection problems are not the issue.
Is this an issue that has been identified by anyone else? And how can it be solved since I would prefer to use Azure cognitive services instead of GCP.

Thanks!

9 REPLIES 9

clem
Graph Steward

Can you:

ping xxxxx.cognitiveservices.azure.com

400 means your client can't connect to the server for some reason.

Thanks for your response!

In fact, when I ping it, the request times out.
Although it is strange since the call with "apoc.nlp.azure.sentiment.stream" works. So why does that one work and apoc.nlp.azure.entities.stream and apoc.nlp.azure.keyphrases.stream return a 400?

Not sure.... but it sounds to me you need to get a network/MS expert to look at it....

There are other protocols that an expert can try to get to it...

I'm not a MS fan... it wouldn't surprise me if some weird Azure configuration isn't properly set up...

does your neo4j configuration file "unrestricted" and "allowlist" has all like apoc.* or only specific apoc's ???

dbms.security.procedures.allowlist (table 255)
dbms.security.procedures.unrestricted (table 258)

It has the default configuration:
dbms.security.procedures.unrestricted=jwt.security.* ,apoc.*
I've also tried different versions of neo4j and different versions of apoc and its dependencies and the problem persists.

I am having the same problems. The entities API is returning a 400 response code whilst the sentiment one seems to work fine.

Thanks! I am glad to see I am not the only one!

It would be helpful to know if this is an issue of the apoc call functions, in which case the Neo4j team could look into it.

Hi

I am not able to activate azure services in neo4j.
Can you please share how you installed and what all settings needs to be done.

I downloaded depenedecy file [apoc-nlp-dependencies-4.2.0.1.jar] and pasted in plugin folder
and added this to config file dbms.security.procedures.unrestricted=jwt.security.* ,apoc.*
but not getting any apoc procedures in my list.

Please advice.

Thanks!

Hi,

It seems like the problem is persisting. Is it possible that the error comes from the fact that apoc nlp tries to fetch for an older version of the Cognitive Services API?
I have the same result that sentiment analysis works but not entity extraction or entity linking.

I'd be greatful for some insight on this. Has anyone of the above been able to fix their issue?

Thanks

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online