Timothy Jaeryang Baek 4 tháng trước cách đây
mục cha
commit
c16896e96d
1 tập tin đã thay đổi với 2 bổ sung0 xóa
  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');