Here's the snipped I'm running; ```ts const response = await env.AI.run('@cf/deepseek-ai/deepseek-r1
Here's the snipped I'm running;
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 });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 }
}
} {
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 }
}
}
