mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-30 18:48:55 +00:00
Fixed the duplicate data check problem, history filter and add tts stream (#477)
This commit is contained in:
@@ -1221,18 +1221,19 @@ function ChatController({
|
||||
name={'voice'}
|
||||
_hover={{ color: '#E74694' }}
|
||||
onClick={async () => {
|
||||
const buffer = await playAudio({
|
||||
const response = await playAudio({
|
||||
buffer: chat.ttsBuffer,
|
||||
chatItemId: chat.dataId,
|
||||
text: chat.value
|
||||
});
|
||||
if (!setChatHistory) return;
|
||||
|
||||
if (!setChatHistory || !response.buffer) return;
|
||||
setChatHistory((state) =>
|
||||
state.map((item) =>
|
||||
item.dataId === chat.dataId
|
||||
? {
|
||||
...item,
|
||||
ttsBuffer: buffer
|
||||
ttsBuffer: response.buffer
|
||||
}
|
||||
: item
|
||||
)
|
||||
|
Reference in New Issue
Block a user