Spaces:
Runtime error
Runtime error
Improved handling of streaming response from OpenAI API in Playground component.
Browse files74 unmodified lines757677787879807980818283848574 unmodified lines max_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]; 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