diff --git a/Service/Plugins/AiService2.cs b/Service/Plugins/AiService2.cs index 77a95ca76..facb4ecd1 100644 --- a/Service/Plugins/AiService2.cs +++ b/Service/Plugins/AiService2.cs @@ -389,7 +389,12 @@ namespace BeWo.Service.Plugins var actionType = conversation.ActionType; var context_Type = config.Context_Type; - var sampleCount = prompt.IsOwnsoftPrompt ? prompt?.SamplesCount : null; + var sampleCount = prompt?.SamplesCount; + if(prompt is object && !prompt.IsOwnsoftPrompt) + { + sampleCount = null; + } + var context_loaded = AiContextLoader.LoadContext(actionType, view_context, sampleCount); var configPath = getPromptPath(actionType); var system_prompt = AiSystemPromptFactory.BuildContext(actionType, configPath, context_loaded, context_Type);