mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2025-02-05 14:49:06 +00:00
Allow OpenAI o1
models (#142)
This commit is contained in:
parent
bf01fbd706
commit
5608b48a2d
@ -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"),
|
||||
|
@ -153,18 +153,18 @@ public sealed class ProviderOpenAI(ILogger logger) : BaseProvider("https://api.o
|
||||
/// <inheritdoc />
|
||||
public Task<IEnumerable<Model>> GetTextModels(string? apiKeyProvisional = null, CancellationToken token = default)
|
||||
{
|
||||
return this.LoadModels("gpt-", token, apiKeyProvisional);
|
||||
return this.LoadModels(["gpt-", "o1-"], token, apiKeyProvisional);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public Task<IEnumerable<Model>> 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<IEnumerable<Model>> LoadModels(string prefix, CancellationToken token, string? apiKeyProvisional = null)
|
||||
private async Task<IEnumerable<Model>> 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<ModelsResponse>(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)));
|
||||
}
|
||||
}
|
@ -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/"
|
||||
|
@ -178,6 +178,6 @@
|
||||
"contentHash": "FHNOatmUq0sqJOkTx+UF/9YK1f180cnW5FVqnQMvYUN0elp6wFzbtPSiqbo1/ru8ICp43JM1i7kKkk6GsNGHlA=="
|
||||
}
|
||||
},
|
||||
"net8.0/osx-arm64": {}
|
||||
"net8.0/osx-x64": {}
|
||||
}
|
||||
}
|
3
app/MindWork AI Studio/wwwroot/changelog/v0.9.10.md
Normal file
3
app/MindWork AI Studio/wwwroot/changelog/v0.9.10.md
Normal file
@ -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.
|
@ -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
|
||||
|
2
runtime/Cargo.lock
generated
2
runtime/Cargo.lock
generated
@ -2130,7 +2130,7 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a"
|
||||
|
||||
[[package]]
|
||||
name = "mindwork-ai-studio"
|
||||
version = "0.9.9"
|
||||
version = "0.9.10"
|
||||
dependencies = [
|
||||
"aes",
|
||||
"arboard",
|
||||
|
@ -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"]
|
||||
|
@ -6,7 +6,7 @@
|
||||
},
|
||||
"package": {
|
||||
"productName": "MindWork AI Studio",
|
||||
"version": "0.9.9"
|
||||
"version": "0.9.10"
|
||||
},
|
||||
"tauri": {
|
||||
"allowlist": {
|
||||
|
Loading…
Reference in New Issue
Block a user