Find answers from the community

Updated 5 months ago

Error

At a glance

The community member is new to the platform and is trying to insert/append JSON file embeddings into an existing index. They are using a JSON reader to load the JSON file into a document and then trying to insert it into the index using the index.insert() function. However, they are receiving an OpenAI error stating that the input is invalid. The community member is unsure if this is due to an OpenAI version problem or if they should not be able to insert documents loaded by the JSON reader.

In the comments, another community member suggests that the error usually means the community member tried to embed a node/document with no text. The original community member thanks the other community member and says they will investigate accordingly.

Useful resources
Hey guys I am new here, I am trying to insert/append JSON file embeddings into an existing index:

I am using JSON reader to load the json file into document and was trying to insert it into the index using index.insert function.

But the line index.insert() casted me this openai error:

openai.OpenAIError: Error code: 400 - {'error': {'message': "'$.input' is invalid. Please check the API reference: https://platform.openai.com/docs/api-reference.", 'type': 'invalid_request_error', 'param': None, 'code': None}}

Am I running into a openai version problem? or I shouldn't be able to insert documents loaded by JSON reader?
Attachment
image.png
L
P
2 comments
This error usually means you tired to embed a node/document with no text
Thanks! I'll investigate accordingly!
Add a reply
Sign up and join the conversation on Discord