AiPromptUrl per Config

This commit is contained in:
2026-04-21 14:39:48 +02:00
parent 14beb46c1b
commit 6534ee072b
5 changed files with 8 additions and 6 deletions

View File

@@ -420,6 +420,7 @@
<add key="OllamaUrl" value="https://ai2.ownsoft.de" />
<add key="Ollama2Url" value="https://ai3.ownsoft.de" />
<add key="AiPromptsUrl" value="https://test2.evplaner.de" />
<add key="XRechnungApiUrl" value="https://test2.evplaner.de/xrg/"/>
<add key="StoredTenantFilesFolderPath" value="C:\BeWoPlaner\StoredTenantFiles"/>

View File

@@ -439,6 +439,7 @@
<add key="OllamaUrl" value="https://ai2.ownsoft.de" />
<add key="Ollama2Url" value="https://ai3.ownsoft.de" />
<add key="AiPromptsUrl" value="https://test2.evplaner.de" />
<add key="XRechnungApiUrl" value="https://test2.evplaner.de/xrg/" />
<add key="StoredFilesFolderPath" value="C:\BeWoPlaner\StoredFiles" />

View File

@@ -22,9 +22,9 @@ namespace AICore.Facade
private ILog _logger;
public AiPromptsApiClient()
public AiPromptsApiClient(string url)
{
var base_url = "https://test2.evplaner.de";
var base_url = url;
_logger = LoggerUtils.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);

View File

@@ -15,7 +15,8 @@ namespace BeWo.Service
StoredFilesFolderPath,
StoredTenantFilesFolderPath,
HelloWorldPdfLocation,
BeWoPlanerServiceRoot
BeWoPlanerServiceRoot,
AiPromptsUrl
}
[DefaultValue(None)]

View File

@@ -190,8 +190,6 @@ namespace BeWo.Service.Plugins
}
private AiPromptbausteinFolderDC getOwnsoftFolder(AiActionType aiActionType)
{
var client = new AiPromptsApiClient();
var prompts = syncOwnSoftPrompts(aiActionType);
var prompts_dc = MapperFactory.AiPromptbausteinPrompt.MapToNewDCs(prompts);
@@ -247,7 +245,8 @@ namespace BeWo.Service.Plugins
{
try
{
var client = new AiPromptsApiClient();
var url = MergedConfig.GetSetting(WebConfigSetting.AiPromptsUrl);
var client = new AiPromptsApiClient(url);
var response = client.GetAiPrompts(aiActionType);
return response?.ToList() ?? new List<AiPromptbausteinPromptDC>();
}