Skip to content

Commit

Permalink
com.openai.unity 8.5.3 (#331)
Browse files Browse the repository at this point in the history
- fix Chat.Role enum serialization
  • Loading branch information
StephenHodgson authored Jan 28, 2025
1 parent a37ef21 commit 3f92e6c
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 16 deletions.
54 changes: 44 additions & 10 deletions .github/workflows/unity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,68 @@ on:
- 'main'
pull_request:
branches:
- '*'
- '**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ (github.event_name == 'pull_request' || github.event.action == 'synchronize') }}
cancel-in-progress: ${{(github.event_name == 'pull_request' || github.event.action == 'synchronize')}}
jobs:
build:
permissions:
checks: write
pull-requests: write
name: ${{ matrix.os }} ${{ matrix.unity-version }} ${{ matrix.build-target }}
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-15]
unity-versions: [2021.x, 2022.x, 6000.x]
include:
include: # for each os specify the build targets
- os: ubuntu-latest
unity-version: 2022.x
build-target: Android
- os: ubuntu-latest
unity-version: 6000.x
build-target: Android
- os: ubuntu-latest
unity-version: 2022.x
build-target: StandaloneLinux64
- os: ubuntu-latest
unity-version: 6000.x
build-target: StandaloneLinux64
- os: ubuntu-latest
unity-version: 2022.x
build-target: WebGL
- os: ubuntu-latest
unity-version: 6000.x
build-target: WebGL
- os: windows-latest
unity-version: 2022.x
build-target: StandaloneWindows64
- os: windows-latest
unity-version: 6000.x
build-target: StandaloneWindows64
- os: macos-15
- os: windows-latest
unity-version: 2022.x
build-target: WSAPlayer
- os: windows-latest
unity-version: 6000.x
build-target: WSAPlayer
- os: macos-latest
unity-version: 2022.x
build-target: iOS
- os: macos-latest
unity-version: 6000.x
build-target: iOS
- os: macos-latest
unity-version: 2022.x
build-target: StandaloneOSX
- os: macos-latest
unity-version: 6000.x
build-target: StandaloneOSX
steps:
- uses: actions/checkout@v4
- uses: RageAgainstThePixel/unity-setup@v1
with:
unity-version: ${{ matrix.unity-versions }}
unity-version: ${{ matrix.unity-version }}
build-targets: ${{ matrix.build-target }}
- uses: RageAgainstThePixel/activate-unity-license@v1
with:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System.Runtime.Serialization;

namespace OpenAI
{
/// <summary>
Expand All @@ -11,8 +13,11 @@ namespace OpenAI
/// </remarks>
public enum ReasoningEffort
{
[EnumMember(Value = "low")]
Low = 1,
[EnumMember(Value = "medium")]
Medium,
[EnumMember(Value = "high")]
High
}
}
17 changes: 12 additions & 5 deletions OpenAI/Packages/com.openai.unity/Runtime/Common/Role.cs
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
// Licensed under the MIT License. See LICENSE in the project root for license information.

using System;
using System.Runtime.Serialization;

namespace OpenAI
{
public enum Role
{
[EnumMember(Value = "system")]
System = 1,
Developer = 1,
Assistant = 2,
User = 3,
[EnumMember(Value = "developer")]
Developer,
[EnumMember(Value = "assistant")]
Assistant,
[EnumMember(Value = "user")]
User,
[Obsolete("Use Tool")]
Function = 4,
Tool = 4
[EnumMember(Value = "function")]
Function,
[EnumMember(Value = "tool")]
Tool
}
}
2 changes: 1 addition & 1 deletion OpenAI/Packages/com.openai.unity/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "OpenAI",
"description": "A OpenAI package for the Unity Game Engine to use GPT-4, GPT-3.5, GPT-3 and Dall-E though their RESTful API (currently in beta).\n\nIndependently developed, this is not an official library and I am not affiliated with OpenAI.\n\nAn OpenAI API account is required.",
"keywords": [],
"version": "8.5.1",
"version": "8.5.3",
"unity": "2021.3",
"documentationUrl": "https://github.com/RageAgainstThePixel/com.openai.unity#documentation",
"changelogUrl": "https://github.com/RageAgainstThePixel/com.openai.unity/releases",
Expand Down

0 comments on commit 3f92e6c

Please sign in to comment.