-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Closed
Labels
Description
Feature Description
The example can be found in the OpenAI Provider:
It would be great if you could add a provider like Dify
to make it usable with Vercel AI SDK.
Use Cases
import { createDify } from "@ai-sdk/dify";
import { streamObject } from 'ai';
import { z } from 'zod';
const dify = createDify({
response_mode: "streaming",
inputs: {
name: "John Doe",
},
});
const { partialObjectStream } = streamObject({
model: dify,
schema: z.object({
recipe: z.object({
name: z.string(),
ingredients: z.array(z.string()),
steps: z.array(z.string()),
}),
}),
prompt: 'Generate a lasagna recipe.',
});
for await (const partialObject of partialObjectStream) {
console.clear();
console.log(partialObject);
}Additional context
No response
Reactions are currently unavailable