Chat completion seem to remember language of previous calls

After we make an API call with request to get answer in Spanish. The next API call sometimes returns Spanish (the question is 100% english). It behaves as if there is memory between API calls. As far as I know API calls are stateless.

What could be the explanation for that and how to avoid?
Details:
gpt-4o-2024-08-06
‘temperature’ => 0.20000000000000001,
‘role’ => ‘user’,

1 Like

Hello and welcome to the community!

Are you accidentally appending data to a message thread? Or are you creating a new message thread with each API call?

Thanks for the reply
We are doing new message per call