mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-01 09:49:03 +08:00
fix: enable stream output in assistant settings for chat completion (#7240)
This commit is contained in:
parent
ce32fd32b6
commit
eb650aa586
@ -187,7 +187,7 @@ const HomeWindow: FC = () => {
|
||||
|
||||
fetchChatCompletion({
|
||||
messages: [userMessage],
|
||||
assistant: { ...assistant, model: quickAssistantModel || getDefaultModel() },
|
||||
assistant: { ...assistant, model: quickAssistantModel || getDefaultModel(), settings: { streamOutput: true } },
|
||||
onChunkReceived: (chunk: Chunk) => {
|
||||
if (chunk.type === ChunkType.TEXT_DELTA) {
|
||||
blockContent += chunk.text
|
||||
|
||||
@ -51,7 +51,7 @@ export const processMessages = async (
|
||||
|
||||
await fetchChatCompletion({
|
||||
messages: [userMessage],
|
||||
assistant,
|
||||
assistant: { ...assistant, settings: { streamOutput: true } },
|
||||
onChunkReceived: (chunk: Chunk) => {
|
||||
switch (chunk.type) {
|
||||
case ChunkType.THINKING_DELTA:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user