Received None or empty response from LLM call (Only with Groq models)

Received None or empty response from LLM call.
An unknown error occurred. Please check the details below.
Error details: Invalid response from LLM call - None or empty.
An unknown error occurred. Please check the details below.
Error details: Invalid response from LLM call - None or empty.

This error occurs when I use the model (Llama with groq), but the same code works fine with OpenAI models. How can we use groq models for this?

To boost your chances of getting a good answer, I’d suggest providing more context. It would really help to know which LLM you’re trying to use when you hit that error, and preferably, include a minimal code example so we can reproduce the issue.

But when I use the OpenAI model, it doesn’t give these errors. I thought these errors occur only with open-source LLMs