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