Hi there!
I am creating a concept voice assistant using WebRTC and the model ‘gpt-4o-mini-realtime-preview-2024-12-17’. The App is working ok however due to default cumulative context window the API cost increases very quickly, as for each new question inside the same session the input audio tokens add up contuinuously. I tried using an empty input array “input”: in my ‘response.create’ object but it didn’t work. Something like this:
dataChannel.current.send(JSON.stringify({
type: “response.create”,
response: {
input: , // This removes all previous context
modalities: [“audio”, “text”]
}
}));
Does someone have any idea to help?
Thanks!