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 });