Documentation ¶
Overview ¶
Package v1 is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterFineTuningServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterFineTuningServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FineTuningServiceClient) error
- func RegisterFineTuningServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterFineTuningServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FineTuningServiceServer) error
- func RegisterFineTuningServiceServer(s grpc.ServiceRegistrar, srv FineTuningServiceServer)
- type CancelJobRequest
- type CreateJobRequest
- func (*CreateJobRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateJobRequest) GetHyperparameters() *CreateJobRequest_HyperParameter
- func (x *CreateJobRequest) GetModel() string
- func (x *CreateJobRequest) GetSuffix() string
- func (x *CreateJobRequest) GetTrainingFile() string
- func (x *CreateJobRequest) GetValidationFile() string
- func (*CreateJobRequest) ProtoMessage()
- func (x *CreateJobRequest) ProtoReflect() protoreflect.Message
- func (x *CreateJobRequest) Reset()
- func (x *CreateJobRequest) String() string
- type CreateJobRequest_HyperParameter
- func (*CreateJobRequest_HyperParameter) Descriptor() ([]byte, []int)deprecated
- func (x *CreateJobRequest_HyperParameter) GetBatchSize() string
- func (x *CreateJobRequest_HyperParameter) GetLearningRateMultiplier() string
- func (x *CreateJobRequest_HyperParameter) GetNEpochs() string
- func (*CreateJobRequest_HyperParameter) ProtoMessage()
- func (x *CreateJobRequest_HyperParameter) ProtoReflect() protoreflect.Message
- func (x *CreateJobRequest_HyperParameter) Reset()
- func (x *CreateJobRequest_HyperParameter) String() string
- type FineTuningServiceClient
- type FineTuningServiceServer
- type Job
- func (*Job) Descriptor() ([]byte, []int)deprecated
- func (x *Job) GetCreatedAt() int64
- func (x *Job) GetError() *Job_Error
- func (x *Job) GetFineTunedModel() string
- func (x *Job) GetFinishedAt() int64
- func (x *Job) GetHyperparameters() *Job_HyperParameter
- func (x *Job) GetId() string
- func (x *Job) GetModel() string
- func (x *Job) GetObject() string
- func (x *Job) GetOrganizationId() string
- func (x *Job) GetResultFiles() []string
- func (x *Job) GetStatus() string
- func (x *Job) GetTrainedTokens() int32
- func (x *Job) GetTrainingFile() string
- func (x *Job) GetValidationFile() string
- func (*Job) ProtoMessage()
- func (x *Job) ProtoReflect() protoreflect.Message
- func (x *Job) Reset()
- func (x *Job) String() string
- type Job_Error
- func (*Job_Error) Descriptor() ([]byte, []int)deprecated
- func (x *Job_Error) GetCode() string
- func (x *Job_Error) GetMessage() string
- func (x *Job_Error) GetParam() string
- func (*Job_Error) ProtoMessage()
- func (x *Job_Error) ProtoReflect() protoreflect.Message
- func (x *Job_Error) Reset()
- func (x *Job_Error) String() string
- type Job_HyperParameter
- func (*Job_HyperParameter) Descriptor() ([]byte, []int)deprecated
- func (x *Job_HyperParameter) GetNEpochs() string
- func (*Job_HyperParameter) ProtoMessage()
- func (x *Job_HyperParameter) ProtoReflect() protoreflect.Message
- func (x *Job_HyperParameter) Reset()
- func (x *Job_HyperParameter) String() string
- type ListJobsRequest
- func (*ListJobsRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListJobsRequest) GetAfter() string
- func (x *ListJobsRequest) GetLimit() int32
- func (*ListJobsRequest) ProtoMessage()
- func (x *ListJobsRequest) ProtoReflect() protoreflect.Message
- func (x *ListJobsRequest) Reset()
- func (x *ListJobsRequest) String() string
- type ListJobsResponse
- func (*ListJobsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListJobsResponse) GetData() []*Job
- func (x *ListJobsResponse) GetHasMore() bool
- func (x *ListJobsResponse) GetObject() string
- func (*ListJobsResponse) ProtoMessage()
- func (x *ListJobsResponse) ProtoReflect() protoreflect.Message
- func (x *ListJobsResponse) Reset()
- func (x *ListJobsResponse) String() string
- type UnimplementedFineTuningServiceServer
- func (UnimplementedFineTuningServiceServer) CancelJob(context.Context, *CancelJobRequest) (*Job, error)
- func (UnimplementedFineTuningServiceServer) CreateJob(context.Context, *CreateJobRequest) (*Job, error)
- func (UnimplementedFineTuningServiceServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error)
- type UnsafeFineTuningServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_api_v1_job_manager_service_proto protoreflect.FileDescriptor
var FineTuningService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "llmoperator.fine_tuning.server.v1.FineTuningService", HandlerType: (*FineTuningServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateJob", Handler: _FineTuningService_CreateJob_Handler, }, { MethodName: "ListJobs", Handler: _FineTuningService_ListJobs_Handler, }, { MethodName: "CancelJob", Handler: _FineTuningService_CancelJob_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/v1/job_manager_service.proto", }
FineTuningService_ServiceDesc is the grpc.ServiceDesc for FineTuningService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterFineTuningServiceHandler ¶
func RegisterFineTuningServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterFineTuningServiceHandler registers the http handlers for service FineTuningService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterFineTuningServiceHandlerClient ¶
func RegisterFineTuningServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client FineTuningServiceClient) error
RegisterFineTuningServiceHandlerClient registers the http handlers for service FineTuningService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "FineTuningServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "FineTuningServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "FineTuningServiceClient" to call the correct interceptors.
func RegisterFineTuningServiceHandlerFromEndpoint ¶
func RegisterFineTuningServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterFineTuningServiceHandlerFromEndpoint is same as RegisterFineTuningServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterFineTuningServiceHandlerServer ¶
func RegisterFineTuningServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server FineTuningServiceServer) error
RegisterFineTuningServiceHandlerServer registers the http handlers for service FineTuningService to "mux". UnaryRPC :call FineTuningServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterFineTuningServiceHandlerFromEndpoint instead.
func RegisterFineTuningServiceServer ¶
func RegisterFineTuningServiceServer(s grpc.ServiceRegistrar, srv FineTuningServiceServer)
Types ¶
type CancelJobRequest ¶
type CancelJobRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*CancelJobRequest) Descriptor
deprecated
func (*CancelJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use CancelJobRequest.ProtoReflect.Descriptor instead.
func (*CancelJobRequest) GetId ¶
func (x *CancelJobRequest) GetId() string
func (*CancelJobRequest) ProtoMessage ¶
func (*CancelJobRequest) ProtoMessage()
func (*CancelJobRequest) ProtoReflect ¶
func (x *CancelJobRequest) ProtoReflect() protoreflect.Message
func (*CancelJobRequest) Reset ¶
func (x *CancelJobRequest) Reset()
func (*CancelJobRequest) String ¶
func (x *CancelJobRequest) String() string
type CreateJobRequest ¶
type CreateJobRequest struct { Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model,omitempty"` TrainingFile string `protobuf:"bytes,2,opt,name=training_file,json=trainingFile,proto3" json:"training_file,omitempty"` Hyperparameters *CreateJobRequest_HyperParameter `protobuf:"bytes,3,opt,name=hyperparameters,proto3" json:"hyperparameters,omitempty"` // A string of up to 18 characters that will be added to your fine-tuned model name. // // For example, a suffix of "custom-model-name" would produce a // model name like // ft:gpt-3.5-turbo:openai:custom-model-name:7p4lURel. Suffix string `protobuf:"bytes,4,opt,name=suffix,proto3" json:"suffix,omitempty"` ValidationFile string `protobuf:"bytes,5,opt,name=validation_file,json=validationFile,proto3" json:"validation_file,omitempty"` // contains filtered or unexported fields }
func (*CreateJobRequest) Descriptor
deprecated
func (*CreateJobRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateJobRequest.ProtoReflect.Descriptor instead.
func (*CreateJobRequest) GetHyperparameters ¶
func (x *CreateJobRequest) GetHyperparameters() *CreateJobRequest_HyperParameter
func (*CreateJobRequest) GetModel ¶
func (x *CreateJobRequest) GetModel() string
func (*CreateJobRequest) GetSuffix ¶
func (x *CreateJobRequest) GetSuffix() string
func (*CreateJobRequest) GetTrainingFile ¶
func (x *CreateJobRequest) GetTrainingFile() string
func (*CreateJobRequest) GetValidationFile ¶
func (x *CreateJobRequest) GetValidationFile() string
func (*CreateJobRequest) ProtoMessage ¶
func (*CreateJobRequest) ProtoMessage()
func (*CreateJobRequest) ProtoReflect ¶
func (x *CreateJobRequest) ProtoReflect() protoreflect.Message
func (*CreateJobRequest) Reset ¶
func (x *CreateJobRequest) Reset()
func (*CreateJobRequest) String ¶
func (x *CreateJobRequest) String() string
type CreateJobRequest_HyperParameter ¶
type CreateJobRequest_HyperParameter struct { // Note: OpenAI API supports string or interger. BatchSize string `protobuf:"bytes,1,opt,name=batch_size,json=batchSize,proto3" json:"batch_size,omitempty"` // Note: OpenAI API supports string or number. LearningRateMultiplier string `` /* 129-byte string literal not displayed */ // Note: OpenAI API supports string or interger. NEpochs string `protobuf:"bytes,3,opt,name=n_epochs,json=nEpochs,proto3" json:"n_epochs,omitempty"` // contains filtered or unexported fields }
func (*CreateJobRequest_HyperParameter) Descriptor
deprecated
func (*CreateJobRequest_HyperParameter) Descriptor() ([]byte, []int)
Deprecated: Use CreateJobRequest_HyperParameter.ProtoReflect.Descriptor instead.
func (*CreateJobRequest_HyperParameter) GetBatchSize ¶
func (x *CreateJobRequest_HyperParameter) GetBatchSize() string
func (*CreateJobRequest_HyperParameter) GetLearningRateMultiplier ¶
func (x *CreateJobRequest_HyperParameter) GetLearningRateMultiplier() string
func (*CreateJobRequest_HyperParameter) GetNEpochs ¶
func (x *CreateJobRequest_HyperParameter) GetNEpochs() string
func (*CreateJobRequest_HyperParameter) ProtoMessage ¶
func (*CreateJobRequest_HyperParameter) ProtoMessage()
func (*CreateJobRequest_HyperParameter) ProtoReflect ¶
func (x *CreateJobRequest_HyperParameter) ProtoReflect() protoreflect.Message
func (*CreateJobRequest_HyperParameter) Reset ¶
func (x *CreateJobRequest_HyperParameter) Reset()
func (*CreateJobRequest_HyperParameter) String ¶
func (x *CreateJobRequest_HyperParameter) String() string
type FineTuningServiceClient ¶
type FineTuningServiceClient interface { CreateJob(ctx context.Context, in *CreateJobRequest, opts ...grpc.CallOption) (*Job, error) ListJobs(ctx context.Context, in *ListJobsRequest, opts ...grpc.CallOption) (*ListJobsResponse, error) CancelJob(ctx context.Context, in *CancelJobRequest, opts ...grpc.CallOption) (*Job, error) }
FineTuningServiceClient is the client API for FineTuningService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewFineTuningServiceClient ¶
func NewFineTuningServiceClient(cc grpc.ClientConnInterface) FineTuningServiceClient
type FineTuningServiceServer ¶
type FineTuningServiceServer interface { CreateJob(context.Context, *CreateJobRequest) (*Job, error) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error) CancelJob(context.Context, *CancelJobRequest) (*Job, error) // contains filtered or unexported methods }
FineTuningServiceServer is the server API for FineTuningService service. All implementations must embed UnimplementedFineTuningServiceServer for forward compatibility
type Job ¶
type Job struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CreatedAt int64 `protobuf:"varint,2,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` Error *Job_Error `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` // The name of the fine-tuned model that is being created. The value will be null if the fine-tuning job is still running. FineTunedModel string `protobuf:"bytes,4,opt,name=fine_tuned_model,json=fineTunedModel,proto3" json:"fine_tuned_model,omitempty"` FinishedAt int64 `protobuf:"varint,5,opt,name=finished_at,json=finishedAt,proto3" json:"finished_at,omitempty"` Hyperparameters *Job_HyperParameter `protobuf:"bytes,6,opt,name=hyperparameters,proto3" json:"hyperparameters,omitempty"` // The base model that is being fine-tuned. Model string `protobuf:"bytes,7,opt,name=model,proto3" json:"model,omitempty"` Object string `protobuf:"bytes,8,opt,name=object,proto3" json:"object,omitempty"` OrganizationId string `protobuf:"bytes,9,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"` ResultFiles []string `protobuf:"bytes,10,rep,name=result_files,json=resultFiles,proto3" json:"result_files,omitempty"` // The current status of the fine-tuning job, which can be either validating_files, queued, running, succeeded, failed, or cancelled. Status string `protobuf:"bytes,11,opt,name=status,proto3" json:"status,omitempty"` TrainedTokens int32 `protobuf:"varint,12,opt,name=trained_tokens,json=trainedTokens,proto3" json:"trained_tokens,omitempty"` TrainingFile string `protobuf:"bytes,13,opt,name=training_file,json=trainingFile,proto3" json:"training_file,omitempty"` ValidationFile string `protobuf:"bytes,14,opt,name=validation_file,json=validationFile,proto3" json:"validation_file,omitempty"` // contains filtered or unexported fields }
func (*Job) Descriptor
deprecated
func (*Job) GetCreatedAt ¶
func (*Job) GetFineTunedModel ¶
func (*Job) GetFinishedAt ¶
func (*Job) GetHyperparameters ¶
func (x *Job) GetHyperparameters() *Job_HyperParameter
func (*Job) GetOrganizationId ¶
func (*Job) GetResultFiles ¶
func (*Job) GetTrainedTokens ¶
func (*Job) GetTrainingFile ¶
func (*Job) GetValidationFile ¶
func (*Job) ProtoMessage ¶
func (*Job) ProtoMessage()
func (*Job) ProtoReflect ¶
func (x *Job) ProtoReflect() protoreflect.Message
type Job_Error ¶
type Job_Error struct { Code string `protobuf:"bytes,1,opt,name=code,proto3" json:"code,omitempty"` Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` Param string `protobuf:"bytes,3,opt,name=param,proto3" json:"param,omitempty"` // contains filtered or unexported fields }
func (*Job_Error) Descriptor
deprecated
func (*Job_Error) GetMessage ¶
func (*Job_Error) ProtoMessage ¶
func (*Job_Error) ProtoMessage()
func (*Job_Error) ProtoReflect ¶
func (x *Job_Error) ProtoReflect() protoreflect.Message
type Job_HyperParameter ¶
type Job_HyperParameter struct { // Note: OpenAI API supports string or interger. NEpochs string `protobuf:"bytes,1,opt,name=n_epochs,json=nEpochs,proto3" json:"n_epochs,omitempty"` // contains filtered or unexported fields }
func (*Job_HyperParameter) Descriptor
deprecated
func (*Job_HyperParameter) Descriptor() ([]byte, []int)
Deprecated: Use Job_HyperParameter.ProtoReflect.Descriptor instead.
func (*Job_HyperParameter) GetNEpochs ¶
func (x *Job_HyperParameter) GetNEpochs() string
func (*Job_HyperParameter) ProtoMessage ¶
func (*Job_HyperParameter) ProtoMessage()
func (*Job_HyperParameter) ProtoReflect ¶
func (x *Job_HyperParameter) ProtoReflect() protoreflect.Message
func (*Job_HyperParameter) Reset ¶
func (x *Job_HyperParameter) Reset()
func (*Job_HyperParameter) String ¶
func (x *Job_HyperParameter) String() string
type ListJobsRequest ¶
type ListJobsRequest struct { After string `protobuf:"bytes,1,opt,name=after,proto3" json:"after,omitempty"` Limit int32 `protobuf:"varint,2,opt,name=limit,proto3" json:"limit,omitempty"` // contains filtered or unexported fields }
func (*ListJobsRequest) Descriptor
deprecated
func (*ListJobsRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListJobsRequest.ProtoReflect.Descriptor instead.
func (*ListJobsRequest) GetAfter ¶
func (x *ListJobsRequest) GetAfter() string
func (*ListJobsRequest) GetLimit ¶
func (x *ListJobsRequest) GetLimit() int32
func (*ListJobsRequest) ProtoMessage ¶
func (*ListJobsRequest) ProtoMessage()
func (*ListJobsRequest) ProtoReflect ¶
func (x *ListJobsRequest) ProtoReflect() protoreflect.Message
func (*ListJobsRequest) Reset ¶
func (x *ListJobsRequest) Reset()
func (*ListJobsRequest) String ¶
func (x *ListJobsRequest) String() string
type ListJobsResponse ¶
type ListJobsResponse struct { Object string `protobuf:"bytes,1,opt,name=object,proto3" json:"object,omitempty"` Data []*Job `protobuf:"bytes,2,rep,name=data,proto3" json:"data,omitempty"` HasMore bool `protobuf:"varint,3,opt,name=has_more,json=hasMore,proto3" json:"has_more,omitempty"` // contains filtered or unexported fields }
func (*ListJobsResponse) Descriptor
deprecated
func (*ListJobsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListJobsResponse.ProtoReflect.Descriptor instead.
func (*ListJobsResponse) GetData ¶
func (x *ListJobsResponse) GetData() []*Job
func (*ListJobsResponse) GetHasMore ¶
func (x *ListJobsResponse) GetHasMore() bool
func (*ListJobsResponse) GetObject ¶
func (x *ListJobsResponse) GetObject() string
func (*ListJobsResponse) ProtoMessage ¶
func (*ListJobsResponse) ProtoMessage()
func (*ListJobsResponse) ProtoReflect ¶
func (x *ListJobsResponse) ProtoReflect() protoreflect.Message
func (*ListJobsResponse) Reset ¶
func (x *ListJobsResponse) Reset()
func (*ListJobsResponse) String ¶
func (x *ListJobsResponse) String() string
type UnimplementedFineTuningServiceServer ¶
type UnimplementedFineTuningServiceServer struct { }
UnimplementedFineTuningServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedFineTuningServiceServer) CancelJob ¶
func (UnimplementedFineTuningServiceServer) CancelJob(context.Context, *CancelJobRequest) (*Job, error)
func (UnimplementedFineTuningServiceServer) CreateJob ¶
func (UnimplementedFineTuningServiceServer) CreateJob(context.Context, *CreateJobRequest) (*Job, error)
func (UnimplementedFineTuningServiceServer) ListJobs ¶
func (UnimplementedFineTuningServiceServer) ListJobs(context.Context, *ListJobsRequest) (*ListJobsResponse, error)
type UnsafeFineTuningServiceServer ¶
type UnsafeFineTuningServiceServer interface {
// contains filtered or unexported methods
}
UnsafeFineTuningServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to FineTuningServiceServer will result in compilation errors.