constant

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: Apache-2.0 Imports: 1 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValueOf

func ValueOf[T Constant[T]]() T

ValueOf gives the default value of a constant from its type. It's helpful when constructing constants as variants in a one-of. Note that empty structs are marshalled by default. Usage: constant.ValueOf[constant.Foo]()

Types

type AudioTtsChunk added in v0.7.0

type AudioTtsChunk string // Always "audio.tts.chunk"

func (AudioTtsChunk) Default added in v0.7.0

func (c AudioTtsChunk) Default() AudioTtsChunk

func (AudioTtsChunk) MarshalJSON added in v0.7.0

func (c AudioTtsChunk) MarshalJSON() ([]byte, error)

type ChatCompletion added in v0.7.0

type ChatCompletion string // Always "chat.completion"

func (ChatCompletion) Default added in v0.7.0

func (c ChatCompletion) Default() ChatCompletion

func (ChatCompletion) MarshalJSON added in v0.7.0

func (c ChatCompletion) MarshalJSON() ([]byte, error)

type ChatCompletionChunk added in v0.7.0

type ChatCompletionChunk string // Always "chat.completion.chunk"

func (ChatCompletionChunk) Default added in v0.7.0

func (ChatCompletionChunk) MarshalJSON added in v0.7.0

func (c ChatCompletionChunk) MarshalJSON() ([]byte, error)

type Constant

type Constant[T any] interface {
	Default() T
}

type Embedding added in v0.7.0

type Embedding string // Always "embedding"

func (Embedding) Default added in v0.7.0

func (c Embedding) Default() Embedding

func (Embedding) MarshalJSON added in v0.7.0

func (c Embedding) MarshalJSON() ([]byte, error)

type Endpoint added in v0.7.0

type Endpoint string // Always "endpoint"

func (Endpoint) Default added in v0.7.0

func (c Endpoint) Default() Endpoint

func (Endpoint) MarshalJSON added in v0.7.0

func (c Endpoint) MarshalJSON() ([]byte, error)

type Error

type Error string // Always "error"

func (Error) Default

func (c Error) Default() Error

func (Error) MarshalJSON

func (c Error) MarshalJSON() ([]byte, error)

type File added in v0.7.0

type File string // Always "file"

func (File) Default added in v0.7.0

func (c File) Default() File

func (File) MarshalJSON added in v0.7.0

func (c File) MarshalJSON() ([]byte, error)

type FineTuneEvent added in v0.7.0

type FineTuneEvent string // Always "fine-tune-event"

func (FineTuneEvent) Default added in v0.7.0

func (c FineTuneEvent) Default() FineTuneEvent

func (FineTuneEvent) MarshalJSON added in v0.7.0

func (c FineTuneEvent) MarshalJSON() ([]byte, error)

type Hardware added in v0.7.0

type Hardware string // Always "hardware"

func (Hardware) Default added in v0.7.0

func (c Hardware) Default() Hardware

func (Hardware) MarshalJSON added in v0.7.0

func (c Hardware) MarshalJSON() ([]byte, error)

type JsonObject

type JsonObject string // Always "json_object"

func (JsonObject) Default

func (c JsonObject) Default() JsonObject

func (JsonObject) MarshalJSON

func (c JsonObject) MarshalJSON() ([]byte, error)

type JsonSchema

type JsonSchema string // Always "json_schema"

func (JsonSchema) Default

func (c JsonSchema) Default() JsonSchema

func (JsonSchema) MarshalJSON

func (c JsonSchema) MarshalJSON() ([]byte, error)

type List added in v0.7.0

type List string // Always "list"

func (List) Default added in v0.7.0

func (c List) Default() List

func (List) MarshalJSON added in v0.7.0

func (c List) MarshalJSON() ([]byte, error)

type Model added in v0.7.0

type Model string // Always "model"

func (Model) Default added in v0.7.0

func (c Model) Default() Model

func (Model) MarshalJSON added in v0.7.0

func (c Model) MarshalJSON() ([]byte, error)

type Rerank added in v0.7.0

type Rerank string // Always "rerank"

func (Rerank) Default added in v0.7.0

func (c Rerank) Default() Rerank

func (Rerank) MarshalJSON added in v0.7.0

func (c Rerank) MarshalJSON() ([]byte, error)

type Text

type Text string // Always "text"

func (Text) Default

func (c Text) Default() Text

func (Text) MarshalJSON

func (c Text) MarshalJSON() ([]byte, error)

type TextCompletion added in v0.7.0

type TextCompletion string // Always "text.completion"

func (TextCompletion) Default added in v0.7.0

func (c TextCompletion) Default() TextCompletion

func (TextCompletion) MarshalJSON added in v0.7.0

func (c TextCompletion) MarshalJSON() ([]byte, error)

Jump to

Keyboard shortcuts

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