import { LLM } from 'lilbots';
export async function main(inputs, params) {
const llm = new LLM();
// Prepare context based on user input
const contentType = inputs.type || "blog post";
const topic = inputs.topic;
const response = await llm.chat.completions.create({
messages: [
{
role: 'developer',
content: `You are a professional content creator specializing in ${contentType} creation.
Produce high-quality, engaging content that is informative and well-structured.`
},
{
role: 'user',
content: `Create a ${contentType} about "${topic}". Keep it concise but comprehensive.`
}
]
});
return [{
title: `Generated ${contentType.charAt(0).toUpperCase() + contentType.slice(1)}`,
message: response.choices[0].message.content
}];
}