Skip to content

Commit

Permalink
com.openai.unity 8.4.3 (#311)
Browse files Browse the repository at this point in the history
- fixed docs
- fixed missing samples
  • Loading branch information
StephenHodgson authored Nov 20, 2024
1 parent 33c2870 commit 2e54704
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 4 deletions.
4 changes: 2 additions & 2 deletions OpenAI/Packages/com.openai.unity/Documentation~/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -437,10 +437,10 @@ var tools = new List<Tool>
};
var options = new Options(Model.GPT4oRealtime, tools: tools);
using var session = await api.RealtimeEndpoint.CreateSessionAsync(options);
var responseTask = await session.ReceiveUpdatesAsync<IServerEvent>(ServerEvents, cancellationTokenSource.Token);
var responseTask = session.ReceiveUpdatesAsync<IServerEvent>(ServerEvents, cancellationTokenSource.Token);
await session.SendAsync(new ConversationItemCreateRequest("Hello!"));
await session.SendAsync(new CreateResponseRequest());
await session.SendAsync(new InputAudioBufferAppendRequest(new ReadOnlyMemory<byte>(new byte[1024 * 4])), cts.Token);
await session.SendAsync(new InputAudioBufferAppendRequest(new ReadOnlyMemory<byte>(new byte[1024 * 4])), cancellationTokenSource.Token);
await session.SendAsync(new ConversationItemCreateRequest("GoodBye!"));
await session.SendAsync(new CreateResponseRequest());
await responseTask;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using UnityEngine.Scripting;

Expand Down
12 changes: 11 additions & 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.4.2",
"version": "8.4.3",
"unity": "2021.3",
"documentationUrl": "https://github.com/RageAgainstThePixel/com.openai.unity#documentation",
"changelogUrl": "https://github.com/RageAgainstThePixel/com.openai.unity/releases",
Expand All @@ -26,6 +26,16 @@
"displayName": "Chat",
"description": "Contains sample chat behaviour and scene",
"path": "Samples~/Chat"
},
{
"displayName": "Assistant",
"description": "Contains sample assistant behaviour and scene",
"path": "Samples~/Assistant"
},
{
"displayName": "Realtime",
"description": "Contains sample realtime behaviour and scene",
"path": "Samples~/Realtime"
}
],
"publishConfig": {
Expand Down

0 comments on commit 2e54704

Please sign in to comment.