-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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 Delete Message API #799
feat: Support Delete Message API #799
Conversation
2569761
to
0bdc97a
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #799 +/- ##
==========================================
+ Coverage 98.46% 99.01% +0.55%
==========================================
Files 24 26 +2
Lines 1364 1418 +54
==========================================
+ Hits 1343 1404 +61
+ Misses 15 8 -7
Partials 6 6 ☔ View full report in Codecov by Sentry. |
0bdc97a
to
4dc6f68
Compare
messages_test.go
Outdated
"github.com/sashabaranov/go-openai/internal/test/checks" | ||
) | ||
|
||
var emptyStr = "" | ||
|
||
// TestMessages Tests the messages endpoint of the API using the mocked server. | ||
func TestMessages(t *testing.T) { | ||
func registerServer(t *testing.T, server *test.ServerTest) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
split func for linter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The registerServer
name is very generic, let's name it with something more concrete for this test
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to setupServerForTestMessage
8facd6e
nolint : Deprecated method split function: cognitive complexity 21
447cb85
to
5404aaa
Compare
Thank you for the PR! Added a minor comment |
8737c46
to
8facd6e
Compare
Describe the change
OpenAI documentation
relevant API doc from https://platform.openai.com/docs/api-reference/messages/deleteMessage
Additional context