Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

com.openai.unity 8.4.0 #303

Merged
merged 52 commits into from
Nov 15, 2024
Merged
Changes from 1 commit
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
a144a58
com.openai.unity 8.4.0
StephenHodgson Oct 13, 2024
f33f78f
update project to 2021.3.45f1
StephenHodgson Nov 3, 2024
97572f0
update build workflow
StephenHodgson Nov 3, 2024
75655c9
updated deps
StephenHodgson Nov 3, 2024
e92ec02
.
StephenHodgson Nov 3, 2024
a00249e
updated assistant and chat sample scenes
StephenHodgson Nov 4, 2024
bbabd8f
revert
StephenHodgson Nov 4, 2024
7d7cf1c
added an additional assistant InvokeToolCall overload for non async m…
StephenHodgson Nov 4, 2024
345a324
fix #304
StephenHodgson Nov 4, 2024
d486e92
added some missing preservatives
StephenHodgson Nov 4, 2024
7589a44
.
StephenHodgson Nov 4, 2024
96c83a9
update realtime tool function support
StephenHodgson Nov 4, 2024
06a53a7
add event callback for client sent events
StephenHodgson Nov 4, 2024
6f8317b
update script icons
StephenHodgson Nov 4, 2024
a372e4c
update websocket
StephenHodgson Nov 5, 2024
324c071
added client events
StephenHodgson Nov 8, 2024
6ca133b
get response
StephenHodgson Nov 8, 2024
670d84c
refactor
StephenHodgson Nov 8, 2024
555555f
get audio playback
StephenHodgson Nov 8, 2024
60ee96c
get realtime function calls working
StephenHodgson Nov 10, 2024
052398c
missing classes from last commit
StephenHodgson Nov 10, 2024
e67b8e6
remove obsolete memebers
StephenHodgson Nov 10, 2024
2204aa3
add more assertions for tests
StephenHodgson Nov 10, 2024
feb38bd
organization
StephenHodgson Nov 10, 2024
d08d897
add support for gpt-4o-audio-preview
StephenHodgson Nov 10, 2024
d5204b6
finalized realtime api
StephenHodgson Nov 11, 2024
ce76336
update prompt
StephenHodgson Nov 12, 2024
17f7704
update docs
StephenHodgson Nov 12, 2024
0cf93a3
catch generic async tasks
StephenHodgson Nov 12, 2024
c801793
.
StephenHodgson Nov 12, 2024
2ed2543
.
StephenHodgson Nov 12, 2024
0cb857f
.
StephenHodgson Nov 12, 2024
014b90a
.
StephenHodgson Nov 12, 2024
831caa3
.
StephenHodgson Nov 12, 2024
bcf21e3
.
StephenHodgson Nov 12, 2024
0c220f8
.
StephenHodgson Nov 12, 2024
8a92b6e
.
StephenHodgson Nov 12, 2024
412c093
.
StephenHodgson Nov 12, 2024
73e2000
.
StephenHodgson Nov 12, 2024
758b9f2
.
StephenHodgson Nov 12, 2024
3109e0e
add chat audio output test
StephenHodgson Nov 12, 2024
d634436
.
StephenHodgson Nov 12, 2024
bf739c9
.
StephenHodgson Nov 12, 2024
52566c5
add DownloadFileBytesAsync for webgl apps
StephenHodgson Nov 13, 2024
3e01b04
use DownloadBytesAsync
StephenHodgson Nov 13, 2024
56e0ebd
.
StephenHodgson Nov 14, 2024
7568df2
.
StephenHodgson Nov 14, 2024
837b175
.
StephenHodgson Nov 14, 2024
0e8e2d1
make sure to get all the usage
StephenHodgson Nov 15, 2024
eb70683
revert
StephenHodgson Nov 15, 2024
6c46843
Tool auto generated Invoke reflection names are too long
StephenHodgson Nov 15, 2024
35dbd48
.
StephenHodgson Nov 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add DownloadFileBytesAsync for webgl apps
StephenHodgson committed Nov 13, 2024

Verified

This commit was signed with the committer’s verified signature.
StephenHodgson Stephen Hodgson
commit 52566c580ef7e804759541bb525e838c95a7b9c6
13 changes: 13 additions & 0 deletions OpenAI/Packages/com.openai.unity/Runtime/Files/FilesEndpoint.cs
Original file line number Diff line number Diff line change
@@ -176,5 +176,18 @@ public async Task<string> DownloadFileAsync(string fileId, IProgress<Progress> p
var file = await GetFileInfoAsync(fileId, cancellationToken);
return await Rest.DownloadFileAsync(GetUrl($"/{file.Id}/content"), file.FileName, new RestParameters(client.DefaultRequestHeaders, progress, debug: EnableDebug), cancellationToken);
}

/// <summary>
/// Downloads the specified file into memory.
/// </summary>
/// <param name="fileId">The file id to download.</param>
/// <param name="progress">Optional, progress callback.</param>
/// <param name="cancellationToken">Optional, <see cref="CancellationToken"/>.</param>
/// <returns>The downloaded file bytes.</returns>
public async Task<byte[]> DownloadFileBytesAsync(string fileId, IProgress<Progress> progress = null, CancellationToken cancellationToken = default)
{
var file = await GetFileInfoAsync(fileId, cancellationToken);
return await Rest.DownloadFileBytesAsync(GetUrl($"/{file.Id}/content"), file.FileName, new RestParameters(client.DefaultRequestHeaders, progress, debug: EnableDebug), cancellationToken);
}
}
}