Skip to content

Commit

Permalink
fix: claude2 response format
Browse files Browse the repository at this point in the history
  • Loading branch information
ikechan8370 committed Feb 22, 2024
1 parent 9ef463f commit e5e8562
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/claude.ai/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export class ClaudeAIClient {
let streamData = streamDataRes.body
// console.log(streamData)
let responseText = ''
let streams = streamData.split('\n\n')
let streams = streamData.split('\n').filter(s => s?.includes('data: '))
for (let s of streams) {
let jsonStr = s.replace('data: ', '').trim()
try {
Expand Down

0 comments on commit e5e8562

Please sign in to comment.