From 938af0846bf76d01d3762d3e8ed981352e356e37 Mon Sep 17 00:00:00 2001 From: Demis Bellot Date: Thu, 9 Jan 2025 16:24:30 +0800 Subject: [PATCH] Add phi4 model --- MyApp.ServiceInterface/Data/AppConfig.cs | 3 ++- MyApp.Tests/ImportTests.cs | 10 +++++----- MyApp/Configure.Db.Migrations.cs | 10 ++++++++++ 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/MyApp.ServiceInterface/Data/AppConfig.cs b/MyApp.ServiceInterface/Data/AppConfig.cs index 91a998b..24bd3b2 100644 --- a/MyApp.ServiceInterface/Data/AppConfig.cs +++ b/MyApp.ServiceInterface/Data/AppConfig.cs @@ -87,11 +87,12 @@ public static (string Model, int Questions)[] ModelsForQuestions = ("gemma2-27b", -1), ("qwen2-72b", -1), - ("mistral-nemo", 0), + ("phi", 0), ("gemini-pro", 0), ("gemini-flash", 0), ("llama3.3-70b", 0), ("mixtral", 3), + ("mistral-nemo", 4), ("qwen2.5-72b", 5), ("deepseek-v3-671b", 10), ("gpt-4o-mini", 15), diff --git a/MyApp.Tests/ImportTests.cs b/MyApp.Tests/ImportTests.cs index 2e57b10..4134c61 100644 --- a/MyApp.Tests/ImportTests.cs +++ b/MyApp.Tests/ImportTests.cs @@ -263,12 +263,12 @@ public async Task Can_create_new_users() var api = await client.ApiAsync(new EnsureApplicationUser { - UserName = "llama3.3-70b", - Email = "servicestack.mail+llama3.3-70b@gmail.com", - DisplayName = "Llama 3.3 70B", + UserName = "phi4", + Email = "servicestack.mail+phi4@gmail.com", + DisplayName = "Phi 4 14B", EmailConfirmed = true, - ProfilePath = "/profiles/ll/llama3-70b/llama3-70b.svg", - Model = "llama3.3:70b", + ProfilePath = "/profiles/ph/phi4/phi4.svg", + Model = "phi4", Password = Password, }); diff --git a/MyApp/Configure.Db.Migrations.cs b/MyApp/Configure.Db.Migrations.cs index 3d4bc93..4e0d615 100644 --- a/MyApp/Configure.Db.Migrations.cs +++ b/MyApp/Configure.Db.Migrations.cs @@ -133,6 +133,16 @@ await EnsureUserAsync(new ApplicationUser Model = "phi3", //3B }, "p@55wOrd"); + await EnsureUserAsync(new ApplicationUser + { + UserName = "phi4", + Email = "servicestack.mail+phi4@gmail.com", + DisplayName = "Phi 4 14B", + EmailConfirmed = true, + ProfilePath = "/profiles/ph/phi4/phi4.svg", + Model = "phi4", + }, "p@55wOrd"); + await EnsureUserAsync(new ApplicationUser { UserName = "gemma-2b",