From 60d993a426d813ab3f505bf6066b3a2b38879dfa Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Wed, 24 Jun 2026 15:05:35 +0200 Subject: [PATCH] fix: prompt kann auch null sein --- Service/Plugins/AiService2.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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);