-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat:
fine-tuning
implementation (#242)
- Loading branch information
Showing
24 changed files
with
802 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
52 changes: 52 additions & 0 deletions
52
openai-client/src/commonMain/kotlin/com.aallam.openai.client/FineTuning.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
package com.aallam.openai.client | ||
|
||
import com.aallam.openai.api.core.PaginatedList | ||
import com.aallam.openai.api.finetuning.* | ||
|
||
/** | ||
* Manage fine-tuning jobs to tailor a model to your specific training data. | ||
*/ | ||
public interface FineTuning { | ||
|
||
/** | ||
* Creates a job that fine-tunes a specified model from a given dataset. | ||
* | ||
* Response includes details of the enqueued job including job status and the name of the fine-tuned models once complete. | ||
*/ | ||
public suspend fun fineTuningJob(request: FineTuningRequest): FineTuningJob | ||
|
||
/** | ||
* List your organization's fine-tuning jobs. | ||
* | ||
* @param after Identifier for the last job from the previous pagination request. | ||
* @param limit Number of fine-tuning jobs to retrieve. | ||
*/ | ||
public suspend fun fineTuningJobs(after: String? = null, limit: Int? = null): List<FineTuningJob> | ||
|
||
/** | ||
* Get info about a fine-tuning job. | ||
* | ||
* @param id The ID of the fine-tuning job. | ||
*/ | ||
public suspend fun fineTuningJob(id: FineTuningId): FineTuningJob? | ||
|
||
/** | ||
* Immediately cancel a fine-tune job. | ||
* | ||
* @param id The ID of the fine-tuning job to cancel. | ||
*/ | ||
public suspend fun cancel(id: FineTuningId): FineTuningJob? | ||
|
||
/** | ||
* Get status updates for a fine-tuning job. | ||
* | ||
* @param id The ID of the fine-tuning job to get events for. | ||
* @param after Identifier for the last event from the previous pagination request. | ||
* @param limit Number of events to retrieve. | ||
*/ | ||
public suspend fun fineTuningEvents( | ||
id: FineTuningId, | ||
after: String? = null, | ||
limit: Int? = null | ||
): PaginatedList<FineTuningJobEvent> | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.