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

feat: support gpt-4o-audio-preview #895

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

WqyJh
Copy link
Contributor

@WqyJh WqyJh commented Nov 11, 2024

OpenAI has released a new model gpt-4o-audio-preview which is an end-to-end model for audio input/output. It can be used by chat completion api.

Reference:

@sashabaranov
Copy link
Owner

@WqyJh thank you for the PR! Please the latest changes from master here, so the CI will pass

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.84%. Comparing base (774fc9d) to head (3e53589).
Report is 71 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #895      +/-   ##
==========================================
+ Coverage   98.46%   98.84%   +0.38%     
==========================================
  Files          24       26       +2     
  Lines        1364     1725     +361     
==========================================
+ Hits         1343     1705     +362     
+ Misses         15       14       -1     
  Partials        6        6              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@WqyJh
Copy link
Contributor Author

WqyJh commented Nov 20, 2024

Fixed @sashabaranov

chat.go Show resolved Hide resolved
type TestingT interface {
Fatalf(format string, args ...any)
Errorf(format string, args ...any)
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we even need to abstract it as an interface, or can we use *testing.T?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works for both unittest and benchmark.

// Pointer variable equality is determined based on the equality of the
// referenced values (as opposed to the memory addresses). Function equality
// cannot be determined and will always fail.
func Equal(t TestingT, expected, actual interface{}) bool {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please change interface{} to any across the PR?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

checks.NoError(t, err)
checks.Equal(t, c.response, expected)
}
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please add an integration test? It's pretty hard to review new things these days!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants