Timothy Jaeryang Baek 4 bulan lalu
induk
melakukan
c16896e96d
1 mengubah file dengan 2 tambahan dan 0 penghapusan
  1. 2 0
      src/lib/components/chat/Chat.svelte

+ 2 - 0
src/lib/components/chat/Chat.svelte

@@ -1065,8 +1065,10 @@
 
 		if (choices) {
 			if (choices[0]?.message?.content) {
+				// Non-stream response
 				message.content += choices[0]?.message?.content;
 			} else {
+				// Stream response
 				let value = choices[0]?.delta?.content ?? '';
 				if (message.content == '' && value == '\n') {
 					console.log('Empty response');