Skip to content

Commit

Permalink
Update openAI.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
babaohuang committed Dec 14, 2023
1 parent e21d2a7 commit 4b3b167
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/utils/openAI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ export const sendMessage = async(messages: ChatMessage[]) => {
})

const lastMessage = messages[messages.length - 1]
const lastMessagelog = lastMessage.parts.map(part => part.text).join('')
console.log('Sending message:', lastMessagelog)
const result = await chat.sendMessageStream(lastMessage.parts.map(part => part.text).join(''))
return result
}

0 comments on commit 4b3b167

Please sign in to comment.