From 78fc6b3d2911e28565b6bc3f2c90a4dcbf58a8fe Mon Sep 17 00:00:00 2001 From: Rene Evertz Date: Thu, 7 Aug 2025 16:40:07 +0200 Subject: [PATCH] Personen Navigation funktioniert - doppelte oid Beide OpenWebUi + ollama support --- .../PersonNavigationContextEntryMapper.cs | 4 +- AICore/Facade/LLM/OllamaApiClient.cs | 2 +- AICore/Facade/LLM/OpenWebApiClient.cs | 2 +- BeWo/BeWoApp.xaml.cs | 2 +- BeWo/View/Detail/AI/AiConfigView.xaml | 2 +- BeWo/View/Detail/PersonView.xaml | 1127 ++++++++++++----- .../Navigation/CustomerNavigationView.xaml.cs | 2 +- .../Navigation/EmployeeNavigationView.xaml.cs | 2 +- .../OrganisationNavigationView.xaml.cs | 2 +- .../Navigation/PersonNavigationView.xaml.cs | 3 +- .../SupportConceptNavigationView.xaml.cs | 2 +- BeWo/app.config | 6 +- Data/Entities/AiModel.cs | 14 +- Data/Mappings/AiModel.hbm.xml | 1 + Host/Host.csproj.user | 2 +- Host/Web.Secrets.config.template | 6 + Model/Changes_2025_07_16 AiModelSource.txt | 2 + Service/DCEntityMapper/AiModelDC_AiModel.cs | 2 + Service/Plugins/AiService2.cs | 59 +- Shared/BeWoEntityEnums.cs | 6 + Shared/DataContracts/Feature/AI/AiModelDC.cs | 28 +- 21 files changed, 893 insertions(+), 383 deletions(-) create mode 100644 Model/Changes_2025_07_16 AiModelSource.txt diff --git a/AICore/Context/EntryMapper/PersonNavigationContextEntryMapper.cs b/AICore/Context/EntryMapper/PersonNavigationContextEntryMapper.cs index f49b0a704..92979107d 100644 --- a/AICore/Context/EntryMapper/PersonNavigationContextEntryMapper.cs +++ b/AICore/Context/EntryMapper/PersonNavigationContextEntryMapper.cs @@ -14,8 +14,8 @@ namespace AICore.Context.EntryMapper //pContext.CustomerOid = "---"; //pContext.EmployeeOid = "---"; pContext.FullName = pObject.FirstNameLastName; - pContext.Geschlecht = pObject.Sex.ToString(); - pContext.Function = pObject.Function.Value; + pContext.Geschlecht = pObject.Sex?.ToString(); + pContext.Function = pObject.Function?.Value; } } } diff --git a/AICore/Facade/LLM/OllamaApiClient.cs b/AICore/Facade/LLM/OllamaApiClient.cs index bb125d54d..a43eedf77 100644 --- a/AICore/Facade/LLM/OllamaApiClient.cs +++ b/AICore/Facade/LLM/OllamaApiClient.cs @@ -55,7 +55,7 @@ namespace AICore.Facade.LLM throw new NotImplementedException(); } - var data = response.Data.models.Select(x => new AiModelDC(x.name, x.details.max_context_size)); + var data = response.Data.models.Select(x => new AiModelDC(BS.Shared.AiModelSource.ollama, x.name, x.details.max_context_size)); return ApiResponse>.SuccessResponse(data); } diff --git a/AICore/Facade/LLM/OpenWebApiClient.cs b/AICore/Facade/LLM/OpenWebApiClient.cs index fa817ccac..7ca2d6a58 100644 --- a/AICore/Facade/LLM/OpenWebApiClient.cs +++ b/AICore/Facade/LLM/OpenWebApiClient.cs @@ -55,7 +55,7 @@ namespace AICore.Facade.LLM throw new NotImplementedException(); } - var data = response.Data.data.Select(x => new AiModelDC(x.name, x.details.max_context_size)); + var data = response.Data.data.Select(x => new AiModelDC(BS.Shared.AiModelSource.openwebui, x.name, x.details?.max_context_size ?? -2)); return ApiResponse>.SuccessResponse(data); } diff --git a/BeWo/BeWoApp.xaml.cs b/BeWo/BeWoApp.xaml.cs index dca813ca8..9e5087528 100644 --- a/BeWo/BeWoApp.xaml.cs +++ b/BeWo/BeWoApp.xaml.cs @@ -59,7 +59,7 @@ namespace BeWo public static string ShortVersion = "3.26"; - public static string Version = "Version 3.26 - 1.2.1 Test"; + public static string Version = "Version 3.26 - 1.3 AI Test"; public static int RenderTier = 0; public static bool IsInDesignMode = DesignerProperties.GetIsInDesignMode(new DependencyObject()); diff --git a/BeWo/View/Detail/AI/AiConfigView.xaml b/BeWo/View/Detail/AI/AiConfigView.xaml index bb8c9ab97..76d70ff06 100644 --- a/BeWo/View/Detail/AI/AiConfigView.xaml +++ b/BeWo/View/Detail/AI/AiConfigView.xaml @@ -70,7 +70,7 @@ Grid.Row="1" Grid.Column="2" IsEnabled="False" - Value="{Binding Config.Temperature}" /> + Value="{Binding Config.Temperature}"/>