change model to claud 3.5

This commit is contained in:
dayuan.jiang
2025-04-03 15:10:53 +00:00
parent bc7ef5c5d4
commit 645980fbb6
5 changed files with 433 additions and 74 deletions

View File

@@ -14,12 +14,14 @@ import { useChat } from "@ai-sdk/react";
import { ChatInput } from "@/components/chat-input";
import { ChatMessageDisplay } from "./chat-message-display";
import { useDiagram } from "@/contexts/diagram-context";
import { replaceNodes } from "@/lib/utils";
export default function ChatPanel() {
const {
loadDiagram: onDisplayChart,
handleExport: onExport,
resolverRef,
chartXML,
clearDiagram,
} = useDiagram();
@@ -61,7 +63,7 @@ export default function ChatPanel() {
if (toolCall.toolName === "display_diagram") {
const { xml } = toolCall.args as { xml: string };
// do nothing because we will handle this streamingly in the ChatMessageDisplay component
// onDisplayChart(xml);
onDisplayChart(replaceNodes(chartXML, xml));
return "Successfully displayed the flowchart.";
}
},