38 lines
1.1 KiB
C#
38 lines
1.1 KiB
C#
using AICore.Context.Summary;
|
|
using AICore.Prompt.SystemPrompts;
|
|
using BS.Shared;
|
|
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, BaseContextSummary context, AiDataContextType context_type)
|
|
{
|
|
switch (actionType)
|
|
{
|
|
case AiActionType.ServiceRecord:
|
|
break;
|
|
case AiActionType.ServiceRecordConversation:
|
|
var factory = new AiConversationSystemPromptBuilder(prompt_path);
|
|
var prompt = factory.CreateSystemPrompt(actionType, context, context_type);
|
|
return prompt;
|
|
case AiActionType.ServiceRecordDocumentation:
|
|
var factory2 = new AiFunctionSystemPromptBuilder(prompt_path);
|
|
var prompt2 = factory2.CreateServiceRecordDocumentationSystemPrompt(context);
|
|
return prompt2;
|
|
default:
|
|
break;
|
|
}
|
|
|
|
throw BeWoNotImplementedException.CreateFromEnum(actionType);
|
|
}
|
|
}
|
|
}
|