mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-25 15:10:17 +09:00
fix: 修复编译错误
This commit is contained in:
parent
2bb421b8bf
commit
08d53ef0a6
@ -25,7 +25,7 @@ export interface ChatToolMessage {
|
|||||||
|
|
||||||
export type ChatMessage = RequestMessage & {
|
export type ChatMessage = RequestMessage & {
|
||||||
date: string;
|
date: string;
|
||||||
toolMessages: ChatToolMessage[];
|
toolMessages?: ChatToolMessage[];
|
||||||
streaming?: boolean;
|
streaming?: boolean;
|
||||||
isError?: boolean;
|
isError?: boolean;
|
||||||
id: string;
|
id: string;
|
||||||
@ -299,6 +299,7 @@ export const useChatStore = create<ChatStore>()(
|
|||||||
role: "assistant",
|
role: "assistant",
|
||||||
streaming: true,
|
streaming: true,
|
||||||
model: modelConfig.model,
|
model: modelConfig.model,
|
||||||
|
toolMessages: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
// get recent messages
|
// get recent messages
|
||||||
@ -333,7 +334,7 @@ export const useChatStore = create<ChatStore>()(
|
|||||||
onToolUpdate(toolName, toolInput) {
|
onToolUpdate(toolName, toolInput) {
|
||||||
botMessage.streaming = true;
|
botMessage.streaming = true;
|
||||||
if (toolName && toolInput) {
|
if (toolName && toolInput) {
|
||||||
botMessage.toolMessages.push({
|
botMessage.toolMessages!.push({
|
||||||
toolName,
|
toolName,
|
||||||
toolInput,
|
toolInput,
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user