gpt4-pdf-chatbot-langchain icon indicating copy to clipboard operation
gpt4-pdf-chatbot-langchain copied to clipboard

Error ingesting, suspect wrong MIME type

Open meekaaku opened this issue 1 year ago • 0 comments

Running ingest script errors out with 'Failed to ingest data'.

Looking at the axios error, shows this:

 error: {
    message: 'you must provide a model parameter',
    type: 'invalid_request_error',
    param: null,
    code: null
}

Logging the axios request headers gives this:

HeadersList {
  [Symbol(headers map)]: Map(1) { 'content-type' => 'text/plain;charset=UTF-8' },
  [Symbol(headers map sorted)]: null
}

I suspect the text/plain MIME type is the issue. OpenAI expects application/json AFAIK.

meekaaku avatar Apr 02 '23 10:04 meekaaku