AuthorBuddy/Models/OllamaSettings.cs

58 lines
3.3 KiB
C#
Raw Normal View History

2026-05-14 12:31:35 +02:00
namespace AuthorBuddy.Web.Models;
public class OllamaSettings
{
2026-05-20 06:12:54 +02:00
public string StyleModel { get; set; } = "gemma4:e4b";
public string EmbedModel { get; set; } = "nomic-embed-text";
2026-05-14 12:31:35 +02:00
public string SpellingModel { get; set; } = "phi3:mini";
public string OllamaUrl { get; set; } = "http://localhost:11434";
public string Theme { get; set; } = "light";
2026-05-20 07:27:41 +02:00
public string Language { get; set; } = "de";
2026-05-14 12:31:35 +02:00
2026-05-16 16:13:35 +02:00
public string LektorSystemPrompt { get; set; } = "Du bist ein erfahrener Lektor. Analysiere den Text des Autors. " +
2026-05-14 12:31:35 +02:00
"Optimiere ihn auf einen lebendigen, anschaulichen und subjektiven Stil. " +
"Nutze starke Verben, vermeide unnötige Adjektive und achte auf 'Show, don't tell'. " +
"Antworte direkt mit dem verbesserten Text oder konkreten Vorschlägen.";
2026-05-16 16:13:35 +02:00
public string FactCheckTemplate { get; set; } = "FAKTEN AUS DER DATENBANK:\n{0}\n\n" +
2026-05-14 12:31:35 +02:00
"FRAGE / KONTEXT:\n{1}\n\n" +
"Basierend auf den Fakten, schreibe eine kurze, lebendige Ergänzung oder Korrektur.";
public string SpellingPrompt { get; set; } = "Du bist ein Rechtschreibprüfer. Korrigiere NUR Fehler (Rechtschreibung/Grammatik). " +
"Ändere den Stil nicht. Gib nur den korrigierten Text zurück.";
2026-05-20 06:12:54 +02:00
public string AdvocatusDiaboliPrompt { get; set; } = "Nimm eine radikale Gegenposition zu meinem Text ein. Welche Schwachstellen in meiner Argumentation fallen dir auf?";
public string HookFinderPrompt { get; set; } = "Generiere mir 5 emotionale, packende Einstiegssätze (Hooks) für diesen Text, die den Leser sofort fesseln.";
public string Eli5Prompt { get; set; } = "Wo ist der Text zu kompliziert geschrieben? Liefere mir konkrete Vorschläge, wie ich komplexe Absätze einfacher formulieren kann, ohne den Kern zu verlieren.";
2026-05-20 07:27:41 +02:00
public string LektorSystemPromptEn { get; } = "You are an experienced editor. Analyze the author's text. " +
"Optimize it for a vivid, descriptive, and subjective style. " +
"Use strong verbs, avoid unnecessary adjectives, and follow 'Show, don't tell'. " +
"Respond directly with the improved text or concrete suggestions.";
public string FactCheckTemplateEn { get; } = "FACTS FROM DATABASE:\n{0}\n\n" +
"QUESTION / CONTEXT:\n{1}\n\n" +
"Based on the facts, write a short, vivid addition or correction.";
public string SpellingPromptEn { get; } = "You are a spell checker. Correct ONLY errors (spelling/grammar). " +
"Do not change the style. Return only the corrected text.";
public string AdvocatusDiaboliPromptEn { get; } = "Take a radical opposing position to my text. What weaknesses in my argumentation do you notice?";
public string HookFinderPromptEn { get; } = "Generate 5 emotional, captivating opening sentences (hooks) for this text that immediately grab the reader's attention.";
public string Eli5PromptEn { get; } = "Where is the text too complicated? Give me concrete suggestions on how to simplify complex paragraphs without losing the core message.";
public string GetDefaultPrompt(string dePrompt, string enPrompt, string currentLanguage)
{
return currentLanguage == "en" ? enPrompt : dePrompt;
}
2026-05-14 12:31:35 +02:00
public string GetFactCheckPrompt(string question, string facts)
{
return string.Format(FactCheckTemplate, question, facts);
}
}