Hello everyone,
I have a weird problem using OpenAI API (python module) where sometimes, not always (although it’s frequent), where the response comes incomplete in the middle. I ask it to do something and the response comes something like:
Ok here’s what you asked:
I hope you liked it
But there’s nothing after the colon. I’m printing the entire response object just for debugging and it’s like that, it’s not me incorrectly parsing the response.
Here’s a direct example:
ChatCompletion(id='chatcmpl-9OxHQHAJH51iMaLENrypL6C64H6vd', choices=[Choice(finish_reason='stop', index=0, logprobs=None, message=ChatCompletionMessage(content="Got it, Tiago! Let's try again in English:\nIf you need anything else, just let me know!", role='assistant', function_call=None, tool_calls=None))], created=1715734772, model='gpt-4o-2024-05-13', object='chat.completion', system_fingerprint='fp_729ea513f7', usage=CompletionUsage(completion_tokens=52, prompt_tokens=2077, total_tokens=2129))
Anyone knows why this is happened? It happens in gpt4 or 3