Solved

Response status code: 500 - Python SDK

  • 9 March 2021
  • 1 reply
  • 64 views

Userlevel 3
Badge +1

This is happening with expertai-nlapi-2.1.3

I have an export from a product (Roam Research) that is return results in a psedu-markdown template. I've extracted it out and then run the following code to clean it up a little bit:

eaiString = eaiString + s.get('string').replace('\n', ' ').replace('\r', ' ').replace('{',' ').replace('}',' ') + "\n"
I then called the SDK with the following code

document = client.specific_resource_analysis(
body={"document": {"text":text}},
params={'language':'en', 'resource': 'relevants'})

The text is about 6500 lines and 658k characters.

I had submitted a much smaller excerpt earlier with out any problems so I don't think its an authentication issue.

icon

Best answer by luisaherrmann 9 March 2021, 19:42

View original

1 reply

Userlevel 3
Badge +1

If you have a larger document, try chunking the text or using the expert.ai Edge NL API instead to avoid issues!

Reply