I am trying to get Assistant API to compose an short summary essay from a input of about 10 paragraphs of text , each paragraph being a 20-30 words length. Not a whole lot of data perhaps
I randomly get this error sometimes.
1 validation error for Request body → 1103
Invalid control character at: line 1 column 1104 (char 1103) (type=value_error.jsondecode; msg=Invalid control character at; doc={ …
Has anyone faced this ? I am not able to figure out anything. If I shorten the text inputs at some point in time the error disappears - my total length is only 700 words - so it can be breaking GPT down I hope,
Well it turns out that the content that one feeds to createMessage (GET/v1/threads/thread_xxx/messages) is sensitive to presence of control characters like newline, tab, or double quotes - even if they are extracted from a valid json and escaped
The problem is CreateMessage API method may or may not throw an exception. Instead of throwing an exception it may return ajson of the following format