Skip to content

Commit d563277

Browse files
committed
preserve spaces in ai response
1 parent 306d4b9 commit d563277

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

blockchain/blox.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ import (
88
"fmt"
99
"io"
1010
"net/http"
11-
"strings"
1211
"sync"
1312

1413
"github.com/functionland/go-fula/wap/pkg/wifi"
@@ -639,8 +638,6 @@ func (bl *FxBlockchain) handleChatWithAI(ctx context.Context, from peer.ID, w ht
639638
return // Channel closed
640639
}
641640

642-
chunk = strings.TrimSpace(chunk) // Remove leading/trailing whitespace
643-
644641
if chunk == "" { // Skip empty chunks
645642
continue
646643
}
@@ -669,8 +666,6 @@ func (bl *FxBlockchain) handleChatWithAI(ctx context.Context, from peer.ID, w ht
669666
newContent += choice.Delta.Content
670667
}
671668

672-
newContent = strings.TrimSpace(newContent) // Remove whitespace
673-
674669
response := wifi.ChatWithAIResponse{
675670
Status: true,
676671
Msg: newContent,

0 commit comments

Comments
 (0)