feat: enhance ChatPanel with tool call streaming and update diagram handling

This commit is contained in:
dayuan.jiang
2025-03-22 15:00:40 +00:00
parent fc4383dfb5
commit cfe3445a4f
2 changed files with 9 additions and 32 deletions

View File

@@ -43,11 +43,13 @@ Note that:
// Add system message if only user message is provided
const enhancedMessages = messages.length === 1
? [{ role: "system", content: systemMessage }, ...messages]
: messages;
const result = streamText({
// model: google("gemini-2.0-flash"),
model: openai("gpt-4o"),
toolCallStreaming: true,
messages: enhancedMessages,
tools: {
// Client-side tool that will be executed on the client