operations

package
v2.0.0-...-5a0ceae Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2024 License: MIT, MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SupportedOptionServerURL            = "serverURL"
	SupportedOptionRetries              = "retries"
	SupportedOptionTimeout              = "timeout"
	SupportedOptionAcceptHeaderOverride = "acceptHeaderOverride"
	SupportedOptionURLOverride          = "urlOverride"
)

Variables

View Source
var ErrUnsupportedOption = errors.New("unsupported option")

Functions

This section is empty.

Types

type CancelFineTuneRequest

type CancelFineTuneRequest struct {
	// The ID of the fine-tune job to cancel
	//
	FineTuneID string `pathParam:"style=simple,explode=false,name=fine_tune_id"`
}

func (*CancelFineTuneRequest) GetFineTuneID

func (o *CancelFineTuneRequest) GetFineTuneID() string

type CancelFineTuneResponse

type CancelFineTuneResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	FineTune *shared.FineTune
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CancelFineTuneResponse) GetContentType

func (o *CancelFineTuneResponse) GetContentType() string

func (*CancelFineTuneResponse) GetFineTune

func (o *CancelFineTuneResponse) GetFineTune() *shared.FineTune

func (*CancelFineTuneResponse) GetRawResponse

func (o *CancelFineTuneResponse) GetRawResponse() *http.Response

func (*CancelFineTuneResponse) GetStatusCode

func (o *CancelFineTuneResponse) GetStatusCode() int

type CreateChatCompletionResponse

type CreateChatCompletionResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	CreateChatCompletionResponse *shared.CreateChatCompletionResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateChatCompletionResponse) GetContentType

func (o *CreateChatCompletionResponse) GetContentType() string

func (*CreateChatCompletionResponse) GetCreateChatCompletionResponse

func (o *CreateChatCompletionResponse) GetCreateChatCompletionResponse() *shared.CreateChatCompletionResponse

func (*CreateChatCompletionResponse) GetRawResponse

func (o *CreateChatCompletionResponse) GetRawResponse() *http.Response

func (*CreateChatCompletionResponse) GetStatusCode

func (o *CreateChatCompletionResponse) GetStatusCode() int

type CreateCompletionResponse

type CreateCompletionResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	CreateCompletionResponse *shared.CreateCompletionResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateCompletionResponse) GetContentType

func (o *CreateCompletionResponse) GetContentType() string

func (*CreateCompletionResponse) GetCreateCompletionResponse

func (o *CreateCompletionResponse) GetCreateCompletionResponse() *shared.CreateCompletionResponse

func (*CreateCompletionResponse) GetRawResponse

func (o *CreateCompletionResponse) GetRawResponse() *http.Response

func (*CreateCompletionResponse) GetStatusCode

func (o *CreateCompletionResponse) GetStatusCode() int

type CreateEditResponse

type CreateEditResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	CreateEditResponse *shared.CreateEditResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateEditResponse) GetContentType

func (o *CreateEditResponse) GetContentType() string

func (*CreateEditResponse) GetCreateEditResponse

func (o *CreateEditResponse) GetCreateEditResponse() *shared.CreateEditResponse

func (*CreateEditResponse) GetRawResponse

func (o *CreateEditResponse) GetRawResponse() *http.Response

func (*CreateEditResponse) GetStatusCode

func (o *CreateEditResponse) GetStatusCode() int

type CreateEmbeddingResponse

type CreateEmbeddingResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	CreateEmbeddingResponse *shared.CreateEmbeddingResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateEmbeddingResponse) GetContentType

func (o *CreateEmbeddingResponse) GetContentType() string

func (*CreateEmbeddingResponse) GetCreateEmbeddingResponse

func (o *CreateEmbeddingResponse) GetCreateEmbeddingResponse() *shared.CreateEmbeddingResponse

func (*CreateEmbeddingResponse) GetRawResponse

func (o *CreateEmbeddingResponse) GetRawResponse() *http.Response

func (*CreateEmbeddingResponse) GetStatusCode

func (o *CreateEmbeddingResponse) GetStatusCode() int

type CreateFileResponse

type CreateFileResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	OpenAIFile *shared.OpenAIFile
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateFileResponse) GetContentType

func (o *CreateFileResponse) GetContentType() string

func (*CreateFileResponse) GetOpenAIFile

func (o *CreateFileResponse) GetOpenAIFile() *shared.OpenAIFile

func (*CreateFileResponse) GetRawResponse

func (o *CreateFileResponse) GetRawResponse() *http.Response

func (*CreateFileResponse) GetStatusCode

func (o *CreateFileResponse) GetStatusCode() int

type CreateFineTuneResponse

type CreateFineTuneResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	FineTune *shared.FineTune
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateFineTuneResponse) GetContentType

func (o *CreateFineTuneResponse) GetContentType() string

func (*CreateFineTuneResponse) GetFineTune

func (o *CreateFineTuneResponse) GetFineTune() *shared.FineTune

func (*CreateFineTuneResponse) GetRawResponse

func (o *CreateFineTuneResponse) GetRawResponse() *http.Response

func (*CreateFineTuneResponse) GetStatusCode

func (o *CreateFineTuneResponse) GetStatusCode() int

type CreateImageEditResponse

type CreateImageEditResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	ImagesResponse *shared.ImagesResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateImageEditResponse) GetContentType

func (o *CreateImageEditResponse) GetContentType() string

func (*CreateImageEditResponse) GetImagesResponse

func (o *CreateImageEditResponse) GetImagesResponse() *shared.ImagesResponse

func (*CreateImageEditResponse) GetRawResponse

func (o *CreateImageEditResponse) GetRawResponse() *http.Response

func (*CreateImageEditResponse) GetStatusCode

func (o *CreateImageEditResponse) GetStatusCode() int

type CreateImageResponse

type CreateImageResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	ImagesResponse *shared.ImagesResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateImageResponse) GetContentType

func (o *CreateImageResponse) GetContentType() string

func (*CreateImageResponse) GetImagesResponse

func (o *CreateImageResponse) GetImagesResponse() *shared.ImagesResponse

func (*CreateImageResponse) GetRawResponse

func (o *CreateImageResponse) GetRawResponse() *http.Response

func (*CreateImageResponse) GetStatusCode

func (o *CreateImageResponse) GetStatusCode() int

type CreateImageVariationResponse

type CreateImageVariationResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	ImagesResponse *shared.ImagesResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateImageVariationResponse) GetContentType

func (o *CreateImageVariationResponse) GetContentType() string

func (*CreateImageVariationResponse) GetImagesResponse

func (o *CreateImageVariationResponse) GetImagesResponse() *shared.ImagesResponse

func (*CreateImageVariationResponse) GetRawResponse

func (o *CreateImageVariationResponse) GetRawResponse() *http.Response

func (*CreateImageVariationResponse) GetStatusCode

func (o *CreateImageVariationResponse) GetStatusCode() int

type CreateModerationResponse

type CreateModerationResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	CreateModerationResponse *shared.CreateModerationResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateModerationResponse) GetContentType

func (o *CreateModerationResponse) GetContentType() string

func (*CreateModerationResponse) GetCreateModerationResponse

func (o *CreateModerationResponse) GetCreateModerationResponse() *shared.CreateModerationResponse

func (*CreateModerationResponse) GetRawResponse

func (o *CreateModerationResponse) GetRawResponse() *http.Response

func (*CreateModerationResponse) GetStatusCode

func (o *CreateModerationResponse) GetStatusCode() int

type CreateTranscriptionResponse

type CreateTranscriptionResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	CreateTranscriptionResponse *shared.CreateTranscriptionResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateTranscriptionResponse) GetContentType

func (o *CreateTranscriptionResponse) GetContentType() string

func (*CreateTranscriptionResponse) GetCreateTranscriptionResponse

func (o *CreateTranscriptionResponse) GetCreateTranscriptionResponse() *shared.CreateTranscriptionResponse

func (*CreateTranscriptionResponse) GetRawResponse

func (o *CreateTranscriptionResponse) GetRawResponse() *http.Response

func (*CreateTranscriptionResponse) GetStatusCode

func (o *CreateTranscriptionResponse) GetStatusCode() int

type CreateTranslationResponse

type CreateTranslationResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	CreateTranslationResponse *shared.CreateTranslationResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*CreateTranslationResponse) GetContentType

func (o *CreateTranslationResponse) GetContentType() string

func (*CreateTranslationResponse) GetCreateTranslationResponse

func (o *CreateTranslationResponse) GetCreateTranslationResponse() *shared.CreateTranslationResponse

func (*CreateTranslationResponse) GetRawResponse

func (o *CreateTranslationResponse) GetRawResponse() *http.Response

func (*CreateTranslationResponse) GetStatusCode

func (o *CreateTranslationResponse) GetStatusCode() int

type DeleteFileRequest

type DeleteFileRequest struct {
	// The ID of the file to use for this request
	FileID string `pathParam:"style=simple,explode=false,name=file_id"`
}

func (*DeleteFileRequest) GetFileID

func (o *DeleteFileRequest) GetFileID() string

type DeleteFileResponse

type DeleteFileResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	DeleteFileResponse *shared.DeleteFileResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*DeleteFileResponse) GetContentType

func (o *DeleteFileResponse) GetContentType() string

func (*DeleteFileResponse) GetDeleteFileResponse

func (o *DeleteFileResponse) GetDeleteFileResponse() *shared.DeleteFileResponse

func (*DeleteFileResponse) GetRawResponse

func (o *DeleteFileResponse) GetRawResponse() *http.Response

func (*DeleteFileResponse) GetStatusCode

func (o *DeleteFileResponse) GetStatusCode() int

type DeleteModelRequest

type DeleteModelRequest struct {
	// The model to delete
	Model string `pathParam:"style=simple,explode=false,name=model"`
}

func (*DeleteModelRequest) GetModel

func (o *DeleteModelRequest) GetModel() string

type DeleteModelResponse

type DeleteModelResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	DeleteModelResponse *shared.DeleteModelResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*DeleteModelResponse) GetContentType

func (o *DeleteModelResponse) GetContentType() string

func (*DeleteModelResponse) GetDeleteModelResponse

func (o *DeleteModelResponse) GetDeleteModelResponse() *shared.DeleteModelResponse

func (*DeleteModelResponse) GetRawResponse

func (o *DeleteModelResponse) GetRawResponse() *http.Response

func (*DeleteModelResponse) GetStatusCode

func (o *DeleteModelResponse) GetStatusCode() int

type DownloadFileRequest

type DownloadFileRequest struct {
	// The ID of the file to use for this request
	FileID string `pathParam:"style=simple,explode=false,name=file_id"`
}

func (*DownloadFileRequest) GetFileID

func (o *DownloadFileRequest) GetFileID() string

type DownloadFileResponse

type DownloadFileResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
	// OK
	String *string
}

func (*DownloadFileResponse) GetContentType

func (o *DownloadFileResponse) GetContentType() string

func (*DownloadFileResponse) GetRawResponse

func (o *DownloadFileResponse) GetRawResponse() *http.Response

func (*DownloadFileResponse) GetStatusCode

func (o *DownloadFileResponse) GetStatusCode() int

func (*DownloadFileResponse) GetString

func (o *DownloadFileResponse) GetString() *string

type ListFilesResponse

type ListFilesResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	ListFilesResponse *shared.ListFilesResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*ListFilesResponse) GetContentType

func (o *ListFilesResponse) GetContentType() string

func (*ListFilesResponse) GetListFilesResponse

func (o *ListFilesResponse) GetListFilesResponse() *shared.ListFilesResponse

func (*ListFilesResponse) GetRawResponse

func (o *ListFilesResponse) GetRawResponse() *http.Response

func (*ListFilesResponse) GetStatusCode

func (o *ListFilesResponse) GetStatusCode() int

type ListFineTuneEventsRequest

type ListFineTuneEventsRequest struct {
	// The ID of the fine-tune job to get events for.
	//
	FineTuneID string `pathParam:"style=simple,explode=false,name=fine_tune_id"`
	// Whether to stream events for the fine-tune job. If set to true,
	// events will be sent as data-only
	// [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
	// as they become available. The stream will terminate with a
	// `data: [DONE]` message when the job is finished (succeeded, cancelled,
	// or failed).
	//
	// If set to false, only events generated so far will be returned.
	//
	Stream *bool `default:"false" queryParam:"style=form,explode=true,name=stream"`
}

func (*ListFineTuneEventsRequest) GetFineTuneID

func (o *ListFineTuneEventsRequest) GetFineTuneID() string

func (*ListFineTuneEventsRequest) GetStream

func (o *ListFineTuneEventsRequest) GetStream() *bool

func (ListFineTuneEventsRequest) MarshalJSON

func (l ListFineTuneEventsRequest) MarshalJSON() ([]byte, error)

func (*ListFineTuneEventsRequest) UnmarshalJSON

func (l *ListFineTuneEventsRequest) UnmarshalJSON(data []byte) error

type ListFineTuneEventsResponse

type ListFineTuneEventsResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	ListFineTuneEventsResponse *shared.ListFineTuneEventsResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*ListFineTuneEventsResponse) GetContentType

func (o *ListFineTuneEventsResponse) GetContentType() string

func (*ListFineTuneEventsResponse) GetListFineTuneEventsResponse

func (o *ListFineTuneEventsResponse) GetListFineTuneEventsResponse() *shared.ListFineTuneEventsResponse

func (*ListFineTuneEventsResponse) GetRawResponse

func (o *ListFineTuneEventsResponse) GetRawResponse() *http.Response

func (*ListFineTuneEventsResponse) GetStatusCode

func (o *ListFineTuneEventsResponse) GetStatusCode() int

type ListFineTunesResponse

type ListFineTunesResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	ListFineTunesResponse *shared.ListFineTunesResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*ListFineTunesResponse) GetContentType

func (o *ListFineTunesResponse) GetContentType() string

func (*ListFineTunesResponse) GetListFineTunesResponse

func (o *ListFineTunesResponse) GetListFineTunesResponse() *shared.ListFineTunesResponse

func (*ListFineTunesResponse) GetRawResponse

func (o *ListFineTunesResponse) GetRawResponse() *http.Response

func (*ListFineTunesResponse) GetStatusCode

func (o *ListFineTunesResponse) GetStatusCode() int

type ListModelsResponse

type ListModelsResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	ListModelsResponse *shared.ListModelsResponse
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*ListModelsResponse) GetContentType

func (o *ListModelsResponse) GetContentType() string

func (*ListModelsResponse) GetListModelsResponse

func (o *ListModelsResponse) GetListModelsResponse() *shared.ListModelsResponse

func (*ListModelsResponse) GetRawResponse

func (o *ListModelsResponse) GetRawResponse() *http.Response

func (*ListModelsResponse) GetStatusCode

func (o *ListModelsResponse) GetStatusCode() int

type Option

type Option func(*Options, ...string) error

func WithOperationTimeout

func WithOperationTimeout(timeout time.Duration) Option

WithOperationTimeout allows setting the request timeout applied for an operation.

func WithRetries

func WithRetries(config retry.Config) Option

WithRetries allows customizing the default retry configuration.

func WithServerURL

func WithServerURL(serverURL string) Option

WithServerURL allows providing an alternative server URL.

func WithTemplatedServerURL

func WithTemplatedServerURL(serverURL string, params map[string]string) Option

WithTemplatedServerURL allows providing an alternative server URL with templated parameters.

func WithURLOverride

func WithURLOverride(urlOverride string) Option

WithURLOverride allows overriding the URL.

type Options

type Options struct {
	ServerURL   *string
	Retries     *retry.Config
	Timeout     *time.Duration
	URLOverride *string
}

type RetrieveFileRequest

type RetrieveFileRequest struct {
	// The ID of the file to use for this request
	FileID string `pathParam:"style=simple,explode=false,name=file_id"`
}

func (*RetrieveFileRequest) GetFileID

func (o *RetrieveFileRequest) GetFileID() string

type RetrieveFileResponse

type RetrieveFileResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	OpenAIFile *shared.OpenAIFile
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*RetrieveFileResponse) GetContentType

func (o *RetrieveFileResponse) GetContentType() string

func (*RetrieveFileResponse) GetOpenAIFile

func (o *RetrieveFileResponse) GetOpenAIFile() *shared.OpenAIFile

func (*RetrieveFileResponse) GetRawResponse

func (o *RetrieveFileResponse) GetRawResponse() *http.Response

func (*RetrieveFileResponse) GetStatusCode

func (o *RetrieveFileResponse) GetStatusCode() int

type RetrieveFineTuneRequest

type RetrieveFineTuneRequest struct {
	// The ID of the fine-tune job
	//
	FineTuneID string `pathParam:"style=simple,explode=false,name=fine_tune_id"`
}

func (*RetrieveFineTuneRequest) GetFineTuneID

func (o *RetrieveFineTuneRequest) GetFineTuneID() string

type RetrieveFineTuneResponse

type RetrieveFineTuneResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	FineTune *shared.FineTune
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*RetrieveFineTuneResponse) GetContentType

func (o *RetrieveFineTuneResponse) GetContentType() string

func (*RetrieveFineTuneResponse) GetFineTune

func (o *RetrieveFineTuneResponse) GetFineTune() *shared.FineTune

func (*RetrieveFineTuneResponse) GetRawResponse

func (o *RetrieveFineTuneResponse) GetRawResponse() *http.Response

func (*RetrieveFineTuneResponse) GetStatusCode

func (o *RetrieveFineTuneResponse) GetStatusCode() int

type RetrieveModelRequest

type RetrieveModelRequest struct {
	// The ID of the model to use for this request
	Model string `pathParam:"style=simple,explode=false,name=model"`
}

func (*RetrieveModelRequest) GetModel

func (o *RetrieveModelRequest) GetModel() string

type RetrieveModelResponse

type RetrieveModelResponse struct {
	// HTTP response content type for this operation
	ContentType string
	// OK
	Model *shared.Model
	// HTTP response status code for this operation
	StatusCode int
	// Raw HTTP response; suitable for custom response parsing
	RawResponse *http.Response
}

func (*RetrieveModelResponse) GetContentType

func (o *RetrieveModelResponse) GetContentType() string

func (*RetrieveModelResponse) GetModel

func (o *RetrieveModelResponse) GetModel() *shared.Model

func (*RetrieveModelResponse) GetRawResponse

func (o *RetrieveModelResponse) GetRawResponse() *http.Response

func (*RetrieveModelResponse) GetStatusCode

func (o *RetrieveModelResponse) GetStatusCode() int

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL