Files
BeWoPlaner/Server/Components/AICore/Prompt/SystemPrompts/AiFunctionSystemPromptBuilder.cs

58 lines
1.5 KiB
C#
Raw Normal View History

using AICore.Context.Summary;
using AICore.Context.Summary.Function;
using AICore.Context.SummaryParser;
using BS.Shared;
using BS.Shared.Core;
2025-11-27 14:25:15 +01:00
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
2025-12-04 15:06:39 +01:00
namespace AICore.Prompt.SystemPrompts
{
2025-12-04 15:06:39 +01:00
public class AiFunctionSystemPromptBuilder : BaseSystemPromptBuilder
{
2025-12-04 15:06:39 +01:00
public AiFunctionSystemPromptBuilder(string prompt_path) : base(prompt_path)
{
}
2025-12-04 15:06:39 +01:00
public string CreateServiceRecordDocumentationSystemPrompt(BaseContextSummary context)
{
var sb = new StringBuilder();
2026-02-20 12:51:18 +01:00
sb.AppendLine(getCustomSystemPrompt());
2026-02-03 14:27:25 +01:00
sb.AppendLine();
sb.AppendLine();
sb.AppendLine("---");
sb.AppendLine();
sb.AppendLine("### **Allgemein**");
sb.AppendLine($"- Aktuelle Zeit: {DateTime.Now}");
sb.AppendLine();
sb.AppendLine("### **Ansicht**");
sb.AppendLine($"- Ich befinde mich aktuell in der \"{EnumTranslations.Ai2Translation[AiContextType.ServiceRecord]}\" meiner Anwendung.");
sb.AppendLine($"- Es ist kein Filter gesetzt.");
sb.AppendLine();
sb.AppendLine("### **Daten**");
if (context?.Context is null)
{
sb.AppendLine("Dir wurden keine Daten bereitgestellt.");
}
else
{
sb.AppendLine("Du erhälst folgende Daten:");
var parser = new CsvContextSummaryParser();
var parsed = parser.Parse(AiContextType.ServiceRecord, context);
sb.AppendLine(parsed);
}
return sb.ToString();
}
}
2025-11-27 14:25:15 +01:00
}