64bit / async-openai

Rust library for OpenAI
https://docs.rs/async-openai
MIT License
1.11k stars 166 forks source link

Add support the new fine-tuning API (`/fine_tuning/jobs`) for GPT3.5-Turbo or laters #119

Closed usagi closed 10 months ago

usagi commented 11 months ago

Using FineTunes of async-openai with GPT3.5-Turbo as the base model, the following response is returned:

Some("invalid_request_error"): gpt-3.5-turbo can only be fine-tuned on the new fine-tuning API (/fine_tuning/jobs). This API (/fine-tunes) is being deprecated. Please refer to our documentation for more information: https://platform.openai.com/docs/api-reference/fine-tunin

It seems that the async-openai API implementation needs to be updated before it can be used. 🥺

Repro.

  1. CreateFineTuneRequestArgs::default()
  2. .model("gpt-3.5-turbo") (https://docs.rs/async-openai/0.14.3/async_openai/types/struct.CreateFineTuneRequest.html#structfield.model )
  3. .build() and then reqeust with client client.fine_tunes().create(fine_tune_request).await
64bit commented 11 months ago

Hi @usagi

Thank you for reporting the issue. I haven't had chance to update to latest API spec yet. Current implementation is for old spec.

Plan is to update library with latest spec for 0.15.0 release. In the meantime PR is welcome if you'd like to take a look into it.

64bit commented 10 months ago

New Fine Tuning support is released in v0.15.0. Please give it a try!