feat: Support Delete Message API (#799)

* feat: Add DeleteMessage function to API client

* fix: linter

nolint : Deprecated method
split function: cognitive complexity 21

* rename func name for unit-test
This commit is contained in:
Yamagami ken-ichi
2024-08-22 23:27:44 +09:00
committed by GitHub
parent d86425a5cf
commit 6d021190f0
4 changed files with 59 additions and 6 deletions

View File

@@ -115,7 +115,7 @@ func (c *Client) CreateFineTune(ctx context.Context, request FineTuneRequest) (r
// This API will be officially deprecated on January 4th, 2024.
// OpenAI recommends to migrate to the new fine tuning API implemented in fine_tuning_job.go.
func (c *Client) CancelFineTune(ctx context.Context, fineTuneID string) (response FineTune, err error) {
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL("/fine-tunes/"+fineTuneID+"/cancel"))
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL("/fine-tunes/"+fineTuneID+"/cancel")) //nolint:lll //this method is deprecated
if err != nil {
return
}