Spaces:
Runtime error
Runtime error
Improved handling of streaming response from OpenAI API in Playground component.
Browse files74 unmodified lines75767778798081828374 unmodified linesmax_tokens: 500,seed: 0,})) {if (streamingMessage && chunk.choices[0]?.delta?.content) {streamingMessage.content += chunk.choices[0].delta.content;messages = [...messages];}}} catch (error) {74 unmodified lines757677787980818283848574 unmodified linesmax_tokens: 500,seed: 0,})) {if (chunk.choices && chunk.choices.length > 0) {if (streamingMessage && chunk.choices[0]?.delta?.content) {streamingMessage.content += chunk.choices[0].delta.content;messages = [...messages];}}}} catch (error) {
src/lib/components/Playground/Playground.svelte+5-3