Skip to content

Commit

Permalink
OpenAI-DotNet 7.4.1 (#197)
Browse files Browse the repository at this point in the history
- Fixed AssistantExtension.UploadFileAsync spelling error with file purpose.

---------

Co-authored-by: Stephen Hodgson <[email protected]>
  • Loading branch information
michalblaha and StephenHodgson authored Dec 3, 2023
1 parent 046bcf3 commit 93177b0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
4 changes: 2 additions & 2 deletions OpenAI-DotNet/Assistants/AssistantExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ public static async Task<AssistantFileResponse> AttachFileAsync(this AssistantRe
/// <returns><see cref="AssistantFileResponse"/>.</returns>
public static async Task<AssistantFileResponse> UploadFileAsync(this AssistantResponse assistant, string filePath, CancellationToken cancellationToken = default)
{
var file = await assistant.Client.FilesEndpoint.UploadFileAsync(new FileUploadRequest(filePath, "assistant"), cancellationToken).ConfigureAwait(false);
var file = await assistant.Client.FilesEndpoint.UploadFileAsync(new FileUploadRequest(filePath, "assistants"), cancellationToken).ConfigureAwait(false);
return await assistant.AttachFileAsync(file, cancellationToken).ConfigureAwait(false);
}

Expand Down Expand Up @@ -155,4 +155,4 @@ public static async Task<bool> DeleteFileAsync(this AssistantResponse assistant,

#endregion Files
}
}
}
7 changes: 5 additions & 2 deletions OpenAI-DotNet/OpenAI-DotNet.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ More context [on Roger Pincombe's blog](https://rogerpincombe.com/openai-dotnet-
<RepositoryUrl>https://github.com/RageAgainstThePixel/OpenAI-DotNet</RepositoryUrl>
<PackageTags>OpenAI, AI, ML, API, gpt-4, gpt-3.5-tubo, gpt-3, chatGPT, chat-gpt, gpt-2, gpt, dall-e-2, dall-e-3</PackageTags>
<Title>OpenAI-DotNet</Title>
<Version>7.4.0</Version>
<PackageReleaseNotes>Version 7.4.0
<Version>7.4.1</Version>
<PackageReleaseNotes>
Version 7.4.1
- Fixed AssistantExtension.UploadFileAsync spelling error with file purpose.
Version 7.4.0
- Refactored OpenAI.Threads.LastRunError -&gt; OpenAI.Error for more generic use in future.
- Fixed OpenAI.Threads.Annotations namespace
- Fixed OpenAI.Threads.ContextText namespace
Expand Down

0 comments on commit 93177b0

Please sign in to comment.