We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6f81bb3 commit 0037b0cCopy full SHA for 0037b0c
app/components/realtime-chat/realtime-chat.tsx
@@ -90,11 +90,13 @@ export function RealtimeChat({
90
const recentMessages = chatStore.getMessagesWithMemory();
91
for (const message of recentMessages) {
92
const { role, content } = message;
93
- await clientRef.current.sendItem({
94
- type: "message",
95
- role,
96
- content: [{ type: "input_text", text: content }],
97
- });
+ if (typeof content === "string") {
+ await clientRef.current.sendItem({
+ type: "message",
+ role: role as any,
+ content: [{ type: "input_text", text: content as string }],
98
+ });
99
+ }
100
}
101
} catch (error) {
102
console.error("Set message failed:", error);
0 commit comments