Open AI Stream response has issue in chrome, it's fetching the response at a single shot response

const getStreamResponse = async (chatHistory) => {
const raw = JSON.stringify({ history: chatHistory });
const myHeaders = new Headers();
myHeaders.append(“Content-Type”, “application/json”);
myHeaders.append(“Cookie”, “ARRAffinity=4e158f4a8ff4701d62fd72e1fe532606cb1d7862100d33922d9fc6c10f5ea495; ARRAffinitySameSite=4e158f4a8ff4701d62fd72e1fe532606cb1d7862100d33922d9fc6c10f5ea495”);
const requestOptions = {
method: “POST”,
headers: myHeaders,
body: raw,
redirect: “follow”
};

    try {
        setStreamLoading(true);
        setStreamComplete(false);
        fetch(API_URL, requestOptions)
            .then(response => {
                // eslint-disable-next-line no-undef
                const reader = response.body.pipeThrough(new TextDecoderStream()).getReader();

                function read() {
                    reader.read().then(({ done, value }) => {
                        if (done) {
                            console.log("Stream complete");
                            setStreamComplete(true)
                            return;
                        }
                        console.log(value, "asdsd")
                        if (value) {
                            setStreamChatResponse(value);
                        } else {
                            console.log('Error reading stream', value)
                        }

                        // Increment receivedResponses
                        read();
                    }).catch(error => {
                        console.error("Error reading stream", error);
                        setStreamComplete(false)
                    });
                }

                // Start reading response
                read();
            })
            .catch(error => {
                console.error("Fetch error", error);
                setStreamComplete(false)
            });

    } catch (error) {
        console.error("Stream processing error:", error);
    } finally {
        setStreamLoading(false);
        setStreamComplete(false);
    }

following code working fine in edge, displaying chunk by chunk but when it has chrome it’s render full response at a time