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

added delete fine tune model endpoint #497

Merged

Conversation

BrendanMartin
Copy link
Contributor

Describe the change
With the deprecation of the fine-tunes endpoint, OpenAI moved the deletion of fine-tuned models to DELETE /models/{model}. This PR adds this new endpoint in models.go.

Describe your solution
I reworked the code present in fine_tunes.go that was already written for deleting fine-tuned models. Because OpenAI organized the new delete under the "models" prefix, this code is now located in the models.go file.

Tests
The tests used for the previous fine-tune model delete were reworked to use the new endpoint.

@codecov
Copy link

codecov bot commented Sep 23, 2023

Codecov Report

Merging #497 (ac003ce) into master (3589837) will increase coverage by 0.15%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #497      +/-   ##
==========================================
+ Coverage   97.30%   97.46%   +0.15%     
==========================================
  Files          18       18              
  Lines         780      827      +47     
==========================================
+ Hits          759      806      +47     
  Misses         15       15              
  Partials        6        6              
Files Changed Coverage Δ
embeddings.go 100.00% <100.00%> (ø)
models.go 100.00% <100.00%> (ø)

Copy link
Owner

@sashabaranov sashabaranov left a comment

Choose a reason for hiding this comment

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

Thank you so much!

@sashabaranov sashabaranov merged commit 0d5256f into sashabaranov:master Sep 25, 2023
3 checks passed
mudler pushed a commit to mudler/LocalAI that referenced this pull request Oct 1, 2023
…#1122)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
|
[github.com/sashabaranov/go-openai](https://togithub.com/sashabaranov/go-openai)
| require | patch | `v1.15.3` -> `v1.15.4` |

---

### Release Notes

<details>
<summary>sashabaranov/go-openai
(github.com/sashabaranov/go-openai)</summary>

###
[`v1.15.4`](https://togithub.com/sashabaranov/go-openai/releases/tag/v1.15.4)

[Compare
Source](https://togithub.com/sashabaranov/go-openai/compare/v1.15.3...v1.15.4)

#### What's Changed

- added delete fine tune model endpoint by
[@&#8203;BrendanMartin](https://togithub.com/BrendanMartin) in
[sashabaranov/go-openai#497

**Full Changelog**:
sashabaranov/go-openai@v1.15.3...v1.15.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/go-skynet/LocalAI).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4wLjMiLCJ1cGRhdGVkSW5WZXIiOiIzNy4wLjMiLCJ0YXJnZXRCcmFuY2giOiJtYXN0ZXIifQ==-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
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.

None yet

2 participants