Hello!
I’m encountering an error when trying to make a request using batches.
The error I get is: OpenAI API Error: Invalid body: failed to parse JSON value. Please check the value to ensure it is valid JSON. (Common errors include trailing commas, missing closing brackets, missing quotation marks, etc.)
The file ID I am attaching to the request is a JSONL with the test structure from the documentation, which is as follows:
{"custom_id": "request-1", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-3.5-turbo-0125", "messages": [{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 1000}}
{"custom_id": "request-2", "method": "POST", "url": "/v1/chat/completions", "body": {"model": "gpt-3.5-turbo-0125", "messages": [{"role": "system", "content": "You are an unhelpful assistant."},{"role": "user", "content": "Hello world!"}],"max_tokens": 1000}}
I have also tried sending other data, but I always get the same error.
I’m making the request using curl with the headers and parameters indicated in the documentation.
Has anyone encountered a similar situation?
Thanks!