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

OpenAI-DotNet 8.2.4 #365

Merged
merged 5 commits into from
Sep 14, 2024
Merged

OpenAI-DotNet 8.2.4 #365

merged 5 commits into from
Sep 14, 2024

Conversation

StephenHodgson
Copy link
Member

@StephenHodgson StephenHodgson commented Sep 14, 2024

  • Fixed ResponseObjectFormat deserialization when set to auto
  • Added RankingOptions to FileSearchOptions
  • Fixed potential memory leaks when uploading files to various endpoints
  • Added timestamp values to BaseResponse to calculate rate limits

- Fixed ResponseObjectFormat deserialization when set to auto
- Added RankingOptions to FileSearchOptions
- Fixed potential memory leaks when uploading files to various endpoints
RealStillkill and others added 3 commits September 14, 2024 11:07
# Abstract

The current headers return strings such as `12m30s`. If you want to
consume this data, it needs to be parsed into a more usable format. This
PR will add properties to the abstract class BaseResponse that will
parse the header strings into something more useful.

# Changes
- Two new public readonly properties of type TimeSpan have been added to
BaseResponse, `ResetTokensTimespan ` and `ResetTokensTimespan `
- The original properties have not been changed in order to avoid any
breaking changes for downstream projects that may be relying on them.

# Testing Methods
Since regex done poorly can be a massive hindrance in terms of
performance, the regex's performance has been tested using a separate
project. The regex was run through 100k randomly generated timestamps.
The code can be found
[here](https://github.com/RealStillkill/OpenAI-DotNet-RegexMetrics). The
compute time of the regex was negligible.

This change was based on an extension method used in a private project.
It has not produced any problems during its usage in the other project.

---------

Co-authored-by: Stephen Hodgson <[email protected]>
@StephenHodgson StephenHodgson changed the title OpenAI-DotNet 8.2.3 OpenAI-DotNet 8.2.4 Sep 14, 2024
@StephenHodgson StephenHodgson marked this pull request as ready for review September 14, 2024 17:21
@StephenHodgson StephenHodgson merged commit 455c361 into main Sep 14, 2024
5 checks passed
@StephenHodgson StephenHodgson deleted the development branch September 14, 2024 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Assistants created in Playground fail to properly deserialize output format field value.
2 participants