Skip to content

Commit c5b33f9

Browse files
- Updated Models list
- Added gpt-4.5 - Updated moderation models - removed text-moderation-stable - added omni-moderation-latest - deprecated text-moderation-latest, use omni-moderation-latest
1 parent 4b9a7ad commit c5b33f9

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

OpenAI/Packages/com.openai.unity/Runtime/Models/Model.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// Licensed under the MIT License. See LICENSE in the project root for license information.
22

3-
using Newtonsoft.Json;
43
using System;
54
using System.Collections.Generic;
5+
using Newtonsoft.Json;
66
using UnityEngine.Scripting;
77

88
namespace OpenAI.Models
@@ -97,6 +97,8 @@ internal Model(
9797
[JsonProperty("parent")]
9898
public string Parent { get; }
9999

100+
public static Model GPT4_5 { get; } = new("gpt-4.5-preview", "openai");
101+
100102
public static Model O1 { get; } = new("o1-preview", "openai");
101103

102104
public static Model O1Mini { get; } = new("o1-mini", "openai");
@@ -193,11 +195,12 @@ internal Model(
193195
/// </remarks>
194196
public static Model Embedding_3_Large { get; } = new("text-embedding-3-large", "openai");
195197

196-
/// <summary>
197-
/// The default model for <see cref="Moderations.ModerationsEndpoint"/>.
198-
/// </summary>
198+
public static Model OmniModerationLatest { get; } = new("omni-moderation-latest", "openai");
199+
200+
[Obsolete("use OmniModerationLatest")]
199201
public static Model Moderation_Latest { get; } = new("text-moderation-latest", "openai");
200202

203+
[Obsolete("Removed")]
201204
public static Model Moderation_Stable { get; } = new("text-moderation-stable", "openai");
202205

203206
/// <summary>

OpenAI/Packages/com.openai.unity/Runtime/Moderations/ModerationsRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public ModerationsRequest(
2929
[JsonProperty("model")] string model = null)
3030
{
3131
Input = input;
32-
Model = string.IsNullOrWhiteSpace(model) ? Models.Model.Moderation_Latest : model;
32+
Model = string.IsNullOrWhiteSpace(model) ? Models.Model.OmniModerationLatest : model;
3333
}
3434

3535
[Preserve]

0 commit comments

Comments
 (0)