From 5608b48a2d4ad1ba84bf6c7283c0f1723cce5fc8 Mon Sep 17 00:00:00 2001 From: Thorsten Sommer Date: Thu, 12 Sep 2024 22:58:32 +0200 Subject: [PATCH] Allow OpenAI `o1` models (#142) --- app/MindWork AI Studio/Components/Changelog.Logs.cs | 1 + app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs | 8 ++++---- app/MindWork AI Studio/Provider/ProvidersExtensions.cs | 1 + app/MindWork AI Studio/packages.lock.json | 2 +- app/MindWork AI Studio/wwwroot/changelog/v0.9.10.md | 3 +++ metadata.txt | 8 ++++---- runtime/Cargo.lock | 2 +- runtime/Cargo.toml | 2 +- runtime/tauri.conf.json | 2 +- 9 files changed, 17 insertions(+), 12 deletions(-) create mode 100644 app/MindWork AI Studio/wwwroot/changelog/v0.9.10.md diff --git a/app/MindWork AI Studio/Components/Changelog.Logs.cs b/app/MindWork AI Studio/Components/Changelog.Logs.cs index 0097e8a..5e16fb1 100644 --- a/app/MindWork AI Studio/Components/Changelog.Logs.cs +++ b/app/MindWork AI Studio/Components/Changelog.Logs.cs @@ -13,6 +13,7 @@ public partial class Changelog public static readonly Log[] LOGS = [ + new (185, "v0.9.10, build 185 (2024-09-12 20:52 UTC)", "v0.9.10.md"), new (184, "v0.9.9, build 184 (2024-09-11 21:10 UTC)", "v0.9.9.md"), new (183, "v0.9.8, build 183 (2024-09-09 13:10 UTC)", "v0.9.8.md"), new (182, "v0.9.7, build 182 (2024-09-08 20:55 UTC)", "v0.9.7.md"), diff --git a/app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs b/app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs index 70b80f2..3ca5ac0 100644 --- a/app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs +++ b/app/MindWork AI Studio/Provider/OpenAI/ProviderOpenAI.cs @@ -153,18 +153,18 @@ public sealed class ProviderOpenAI(ILogger logger) : BaseProvider("https://api.o /// public Task> GetTextModels(string? apiKeyProvisional = null, CancellationToken token = default) { - return this.LoadModels("gpt-", token, apiKeyProvisional); + return this.LoadModels(["gpt-", "o1-"], token, apiKeyProvisional); } /// public Task> GetImageModels(string? apiKeyProvisional = null, CancellationToken token = default) { - return this.LoadModels("dall-e-", token, apiKeyProvisional); + return this.LoadModels(["dall-e-"], token, apiKeyProvisional); } #endregion - private async Task> LoadModels(string prefix, CancellationToken token, string? apiKeyProvisional = null) + private async Task> LoadModels(string[] prefixes, CancellationToken token, string? apiKeyProvisional = null) { var secretKey = apiKeyProvisional switch { @@ -187,6 +187,6 @@ public sealed class ProviderOpenAI(ILogger logger) : BaseProvider("https://api.o return []; var modelResponse = await response.Content.ReadFromJsonAsync(token); - return modelResponse.Data.Where(n => n.Id.StartsWith(prefix, StringComparison.InvariantCulture)); + return modelResponse.Data.Where(model => prefixes.Any(prefix => model.Id.StartsWith(prefix, StringComparison.InvariantCulture))); } } \ No newline at end of file diff --git a/app/MindWork AI Studio/Provider/ProvidersExtensions.cs b/app/MindWork AI Studio/Provider/ProvidersExtensions.cs index 2ddc7f8..412796e 100644 --- a/app/MindWork AI Studio/Provider/ProvidersExtensions.cs +++ b/app/MindWork AI Studio/Provider/ProvidersExtensions.cs @@ -42,6 +42,7 @@ public static class ProvidersExtensions Providers.FIREWORKS => Confidence.USA_NOT_TRUSTED.WithRegion("America, U.S.").WithSources("https://fireworks.ai/terms-of-service").WithLevel(settingsManager.GetConfiguredConfidenceLevel(provider)), Providers.OPEN_AI => Confidence.USA_NO_TRAINING.WithRegion("America, U.S.").WithSources( + "https://platform.openai.com/docs/models/default-usage-policies-by-endpoint", "https://openai.com/policies/terms-of-use/", "https://help.openai.com/en/articles/5722486-how-your-data-is-used-to-improve-model-performance", "https://openai.com/enterprise-privacy/" diff --git a/app/MindWork AI Studio/packages.lock.json b/app/MindWork AI Studio/packages.lock.json index a868191..c6124bf 100644 --- a/app/MindWork AI Studio/packages.lock.json +++ b/app/MindWork AI Studio/packages.lock.json @@ -178,6 +178,6 @@ "contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA==" } }, - "net8.0/osx-arm64": {} + "net8.0/osx-x64": {} } } \ No newline at end of file diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.10.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.10.md new file mode 100644 index 0000000..0e6737e --- /dev/null +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.10.md @@ -0,0 +1,3 @@ +# v0.9.10, build 185 (2024-09-12 20:52 UTC) +- Added support for OpenAI's `o1` models. The `01` models presented today are initially limited to tier 5 accounts. This means that only individuals who have invested at least $1,000 in the OpenAI API and whose account is at least 30 days old can see and use `01` models. Once your OpenAI account has been activated for the new `o1` models, you can select these models from the model list in the provider settings. +- Added another source link for the OpenAI's confidence card. \ No newline at end of file diff --git a/metadata.txt b/metadata.txt index 3fd99a3..7c6b796 100644 --- a/metadata.txt +++ b/metadata.txt @@ -1,9 +1,9 @@ -0.9.9 -2024-09-11 21:10:00 UTC -184 +0.9.10 +2024-09-12 20:52:21 UTC +185 8.0.108 (commit 665a05cea7) 8.0.8 (commit 08338fcaa5) 1.81.0 (commit eeb90cda1) 7.8.0 1.7.1 -4722c1baa18, release +c2f6674a407, release diff --git a/runtime/Cargo.lock b/runtime/Cargo.lock index 780d158..8ddf272 100644 --- a/runtime/Cargo.lock +++ b/runtime/Cargo.lock @@ -2130,7 +2130,7 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mindwork-ai-studio" -version = "0.9.9" +version = "0.9.10" dependencies = [ "aes", "arboard", diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index 2f669d2..a98731d 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mindwork-ai-studio" -version = "0.9.9" +version = "0.9.10" edition = "2021" description = "MindWork AI Studio" authors = ["Thorsten Sommer"] diff --git a/runtime/tauri.conf.json b/runtime/tauri.conf.json index 159863d..616ecb3 100644 --- a/runtime/tauri.conf.json +++ b/runtime/tauri.conf.json @@ -6,7 +6,7 @@ }, "package": { "productName": "MindWork AI Studio", - "version": "0.9.9" + "version": "0.9.10" }, "tauri": { "allowlist": {