Hello all,
Problem :
Before i was using StreamObject to stream tasks, but now my app is more complicated so i needed tools so i switched to streamText() which works well, the only thing i miss the object streaming feature, the tools inside streamText generates well an object + stream the text after the tool usage , but not streaming the tool structured output.
Question : is it possible please to stream the tool structured output instead of waiting long time for generating it? thanks.
streamText code :
const result = streamText({
model: mistral('mistral-small-latest'),
maxSteps: 3,
toolCallStreaming: true,
system: getMeetingModalSystemPrompt(context, promptRouter.result),
messages,
tools: {
proposeTodoCreation,
meetingCreation,
noteCreation,
},
});
Tool code :
export const noteCreation = tool({
description: 'Use this tool when the user ask to generate a note or sumamry of meeting',
parameters: z.object({
note: z
.object({
subjects: z.string().describe('main Subjects disscused during the meeting, be detailed'),
futureActions: z.string().describe('planned tasks for future, be detailed'),
})
.describe('create a detailed meeting summary'),
}),
execute: async ({ note }) => note,
});
thank you !