41 lines
1.2 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|