Files
BeWoPlaner/Server/Components/AICore/Prompt/AiSystemPromptFactory.cs
Rene Evertz 89154c0223 Generischer AiSystemPromptBuilder
-> Mehr über SystmePrompt File steuerbar
2026-06-24 10:47:29 +02:00

41 lines
1.2 KiB
C#

using AICore.Context.Summary;
using AICore.Prompt.SystemPrompts;
using BS.Shared;
using BS.Shared.DataContracts.Feature.AI;
using BS.Shared.Exceptions;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net.Mime;
using System.Text;
using System.Threading.Tasks;
namespace AICore.Prompt
{
public class AiSystemPromptFactory
{
public static string BuildContext(AiActionType actionType, string prompt_path, AiViewContextDC view_context, BaseContextSummary context, AiDataContextType context_type)
{
switch (actionType)
{
case AiActionType.ServiceRecord:
break;
case AiActionType.ServiceRecordConversation:
case AiActionType.ServiceRecordDocumentation:
return BuildGenericContext(actionType, prompt_path, view_context, context, context_type);
default:
break;
}
throw BeWoNotImplementedException.CreateFromEnum(actionType);
}
public static string BuildGenericContext(AiActionType actionType, string prompt_path, AiViewContextDC view_context, BaseContextSummary context, AiDataContextType context_type)
{
var factory = new AiGenericSystemPromptBuilder(prompt_path);
return factory.CreateSystemPrompt(actionType, view_context, context, context_type);
}
}
}