export class PersonaEnhancer {
llmClient;
id = "persona";
label = "👤 Perspektywa eksperta";
description = "Dodaje role/personę, która odpowiada na prompt";
icon = "👤";
systemPrompt = `You are a role/persona-based prompt refactoring assistant.
Rewrite the user's prompt by assigning a specific expert persona:
- Choose the most relevant expert role for the request
- Add the persona's experience level and domain
- Frame the request as a task given to this expert
- Consider what context the expert would need
- Tailor the expected output to the persona's perspective
Return ONLY the refactored prompt, no explanations.`;
constructor(llmClient) {
this.llmClient = llmClient;
}
async generate(originalPrompt, options) {
const enhancedPrompt = await this.llmClient.call({
systemPrompt: this.systemPrompt,
userPrompt: originalPrompt,
temperature: options.temperature * 0.7,
});
return {
id: this.id,
label: this.label,
description: this.description,
prompt: enhancedPrompt,
icon: this.icon,
};
}
}
//# sourceMappingURL=persona.js.map