is there any way to run `pyannote` on cloudflare?
is there any way to run
pyannote on cloudflare?pyannote
guidance to something like 1, possibly 2. With higher values, problems with saturation and contrast quickly become apparent. The img2img and inpainting models had similar issues last time I checked. (See cloudflare-ai for example.) And SDXL-lightning has a somewhat similar issue. (Cartoonish speckled result unless you set num_steps to e.g. 2 and guidance to a low value.)ai/run endpoint truncated when @cf/deepseek-ai/deepseek-r1-distill-qwen-32b is clearly midsentence. The request is always 200 too. Is this a known issue of some kind? This has been happening for the past 2 days now.max_tokens for the result is only 256. bumping it up fixed it. there is no indication about it in the response though@cf/deepseek-ai/deepseek-r1-distill-qwen-32b is missing the starting <think> tag in responsesRemote MCP support: Connect to MCP servers directly without requiring a local proxy @geleendeepseek-r1-distill-qwen-32b support tools calls in stream mode? Is there a code example?curl --location --request POST 'https://api.cloudflare.com/client/v4/accounts/REDACTED/ai/run/@cf/black-forest-labs/flux-1-schnell' \
--header 'Authorization: Bearer REDACTED' \
--header 'Content-Type: application/json' \
--header 'Cookie: __cf_bm=V5sLTJx2Y7d6s6bClk.umX36FohdsTMoXamYf1pW1f8-1741683179-1.0.1.1-rGuk5rHKjPNKMCBtB45ZW51MZeJUyqVGXeW4hr0o0m7F7JFsT315BeJAbXd8LKCOuApweso_4kAYQf4SfM6R60cd.ZtvxRyn6o3qLISOqS4' \
--data-raw '{
"prompt" : "A serene tropical beach at sunset, a cozy wooden cottage with smoke rising from the chimney, tall swaying palm trees, calm ocean waves reflecting golden hues of sunlight, painted in a dreamy watercolor style with soft, vibrant colors and intricate details.",
"steps" : 8,
"width" :1024,
"height" : 1024,
"seed" : 93617911245
}'{
"errors": [
{
"message": "AiError: AiError: Invalid input",
"code": 5006
}
],
"success": false,
"result": {},
"messages": []
}const response = await env.AI.run('@cf/deepseek-ai/deepseek-r1-distill-qwen-32b', {
messages: [
{
role: 'user',
content: 'Make a cup of earl grey tea. Use the tool provided.',
},
],
tools: [
{
name: 'make_tea',
description: 'Make a cup of tea',
parameters: {
type: 'object',
properties: {
tea_type: {
type: 'string',
description: 'The type of tea to make',
enum: ['earl grey', 'chamomile', 'peppermint'],
},
},
},
},
],
} satisfies BaseAiTextGeneration['inputs']);
log.info('generateCloudflare', { response }); {
response: {
response: "Okay, so I need to make a cup of Earl Grey tea using the tools provided. Let me think about what I know about making tea and what tools I might have access to. First, I know that Earl Grey is a black tea with a bergamot flavor, so it's usually served hot and might be drunk with milk or just on its own.\n" +
'\n' +
"I should start by figuring out what tools I need. The user mentioned to use the tool provided, but didn't specify what it is. So I'll assume I have a teapot, a kettle for boiling water, a teaspoon for measuring tea, a cup, maybe a strainer, and perhaps a milk pitcher if I want to add milk. I should also consider whether the tools are electric or manual, but I'll go with basic assumptions.\n" +
'\n' +
"First step: Boil water. I'll need to fill the kettle with fresh water and bring it to a boil. The temperature for black tea is usually around 90-100°C, but I think boiling water is fine. Wait, no, sometimes it's better to let the water cool a bit after boiling to prevent over-extracting the tea. But Earl Grey is a black tea, so maybe it's okay to use boiling water.\n" +
'\n',
usage: { prompt_tokens: 20, completion_tokens: 256, total_tokens: 276 }
}
}(info) generateCloudflare {
stream: {
response: 'Okay, so I need to make a cup of Earl Grey tea using the tools provided. Hmm, let me think about what tools I might have. Usually, when making tea, you need a kettle, a teapot, a teacup, tea bags or loose tea, hot water, maybe a strainer, and sugar or milk if you want it. \n' +
'\n' +
"Wait, the user said to use the tool provided, but didn't specify what that tool is. Maybe it's just a regular teapot? Or maybe a tea infuser? I'm not sure. Well, I guess I'll go with the basics.\n" +
'\n' +
"First, I should probably boil some water. If I have a kettle, I can fill it with water and turn it on. While the water is boiling, I can prepare the teapot. If I'm using loose tea, I'll need a tea infuser or a strainer to prevent the leaves from getting into the cup. \n" +
'\n' +
"Once the water is boiling, I should let it cool a bit because Earl Grey tea is best when brewed with water that's just below boiling point, maybe around 90-95 degrees Celsius. If I pour boiling water directly on the tea, it might make it too strong or bitter. \n" +
'\n' +
"So, I'll pour a little bit of hot water into the teapot to warm it up and then discard that water. Then, I'll add the tea leaves or the tea bag. If I'm using loose tea, I'll put the infuser in the teapot. For a standard cup, maybe about a teaspoon of loose tea or one tea bag. \n" +
'\n' +
"Next, I'll pour the hot water over the tea. I'll make sure to cover the teapot to keep the heat in. The steeping time is important. Earl Grey usually takes about 3-5 minutes. If I steep it too long, it might become too strong.\n" +
'\n' +
"After steeping, I'll pour the tea into the cup. If I used an infuser, I'll remove it now. I can add sugar or honey if I want it sweet, or maybe a splash of milk. Some people like it with lemon, so that's an option too.\n" +
'\n' +
"Wait, did I forget anything? Oh, maybe I should consider the type of cup. If it's a ceramic cup, that's good for retaining heat. Glass might be nice if I want to see the tea. Also, maybe I should clean the teapot and tools afterwards to keep them ready for next time.\n" +
'\n' +
"I think that's the basic process. Let me summarize the steps to make sure I didn't miss anything.\n" +
'</think>\n' +
'\n' +
'To make a cup of Earl Grey tea, follow these organized steps:\n' +
'\n' +
'1. **Boil Water**: Fill a kettle with water and bring it to a boil. Allow the water to cool slightly to around 90-95°C (194-203°F) to avoid bitterness.\n' +
'\n' +
'2. **Prepare the Teapot**: Warm the teapot by pouring a small amount of hot water into it, then discard the water.\n' +
'\n' +
'3. **Add Tea**: Place 1 teaspoon of loose Earl Grey tea leaves into a tea infuser or add one Earl Grey tea bag to the teapot.\n' +
'\n' +
'4. **Steep the Tea**: Pour the hot water over the tea and cover the teapot. Steep for 3-5 minutes to achieve the desired strength.\n' +
'\n' +
'5. **Serve**: Carefully pour the tea into a cup. Remove the infuser or tea bag.\n' +
'\n' +
'6. **Customize**: Add sugar, honey, milk, or lemon as preferred.\n' +
'\n' +
'7. **Clean Up**: Rinse the teapot and infuser to keep them ready for future use.\n' +
'\n' +
'Enjoy your Earl Grey tea!',
usage: { prompt_tokens: 20, completion_tokens: 761, total_tokens: 781 }
}
}guidanceguidancenum_stepsai/run