objects

package
v0.7.10 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package objects contains the enum values which represent the various objects returned by all OpenAI endpoints.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Object

type Object int

Object enumerates the various object types returned by OpenAI endpoints.

const (
	// Unknown is an invalid object.
	Unknown Object = iota
	// Model is a model (can be either a base model or fine-tuned).
	Model
	// List is a list of other objects.
	List
	// TextCompletion is a text completion.
	TextCompletion
	// CodeCompletion is a code completion.
	CodeCompletion
	// Edit is an edit.
	Edit
	// Embedding is an embedding.
	Embedding
	// File is a file.
	File
	// FineTune is a fine-tuned model.
	FineTune
	FineTimeEvent
	// Engine represents an engine.
	// Deprecated: use Model instead.
	Engine
	// ChatCompletion represents a chat completion.
	ChatCompletion
)

func (Object) MarshalText

func (o Object) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (Object) String

func (o Object) String() string

String implements the fmt.Stringer interface.

func (*Object) UnmarshalText

func (o *Object) UnmarshalText(b []byte) error

UnmarshalText implements the encoding.TextUnmarshaler interface. On unrecognized value, it sets |e| to Unknown.

Jump to

Keyboard shortcuts

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