mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-05-19 20:20:16 +09:00
ts error
This commit is contained in:
parent
6f81bb3b8a
commit
0037b0c944
@ -90,11 +90,13 @@ export function RealtimeChat({
|
||||
const recentMessages = chatStore.getMessagesWithMemory();
|
||||
for (const message of recentMessages) {
|
||||
const { role, content } = message;
|
||||
await clientRef.current.sendItem({
|
||||
type: "message",
|
||||
role,
|
||||
content: [{ type: "input_text", text: content }],
|
||||
});
|
||||
if (typeof content === "string") {
|
||||
await clientRef.current.sendItem({
|
||||
type: "message",
|
||||
role: role as any,
|
||||
content: [{ type: "input_text", text: content as string }],
|
||||
});
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Set message failed:", error);
|
||||
|
Loading…
Reference in New Issue
Block a user