finetuning.go

 1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
 2
 3package openai
 4
 5import (
 6	"github.com/openai/openai-go/option"
 7)
 8
 9// FineTuningService contains methods and other services that help with interacting
10// with the openai API.
11//
12// Note, unlike clients, this service does not read variables from the environment
13// automatically. You should not instantiate this service directly, and instead use
14// the [NewFineTuningService] method instead.
15type FineTuningService struct {
16	Options     []option.RequestOption
17	Methods     FineTuningMethodService
18	Jobs        FineTuningJobService
19	Checkpoints FineTuningCheckpointService
20	Alpha       FineTuningAlphaService
21}
22
23// NewFineTuningService generates a new service that applies the given options to
24// each request. These options are applied after the parent client's options (if
25// there is one), and before any request-specific options.
26func NewFineTuningService(opts ...option.RequestOption) (r FineTuningService) {
27	r = FineTuningService{}
28	r.Options = opts
29	r.Methods = NewFineTuningMethodService(opts...)
30	r.Jobs = NewFineTuningJobService(opts...)
31	r.Checkpoints = NewFineTuningCheckpointService(opts...)
32	r.Alpha = NewFineTuningAlphaService(opts...)
33	return
34}