refactor: chat-example-panel.tsx

This commit is contained in:
dayuan.jiang
2025-03-25 02:24:12 +00:00
parent df74c36242
commit d2a630929b
5 changed files with 155 additions and 148 deletions

View File

@@ -66,9 +66,9 @@ ${lastMessage.content}
? [{ role: "system", content: systemMessage }, { ...lastMessage, content: formattedContent }]
: [...messages.slice(0, -1), { ...lastMessage, content: formattedContent }];
console.log(enhancedMessages);
const result = streamText({
// model: google("gemini-2.0-flash"),
// model: openai("chatgpt-4o-latest"),
model: openai("gpt-4o"),
toolCallStreaming: true,
messages: enhancedMessages,

View File

@@ -4,7 +4,7 @@ import { DrawIoEmbed, DrawIoEmbedRef } from "react-drawio";
import { useRef, useState } from "react";
import { Button } from "@/components/ui/button";
import { extractDiagramXML } from "./extract_xml";
import ChatPanel from "@/components/chatPanel";
import ChatPanel from "@/components/chat-panel";
export default function Home() {
const drawioRef = useRef<DrawIoEmbedRef>(null);