constant

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 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 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 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 OrgAPIKey added in v0.13.0

type OrgAPIKey string // Always "org_api_key"

func (OrgAPIKey) Default added in v0.13.0

func (c OrgAPIKey) Default() OrgAPIKey

func (OrgAPIKey) MarshalJSON added in v0.13.0

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

type ProjectAPIKey added in v0.13.0

type ProjectAPIKey string // Always "project_api_key"

func (ProjectAPIKey) Default added in v0.13.0

func (c ProjectAPIKey) Default() ProjectAPIKey

func (ProjectAPIKey) MarshalJSON added in v0.13.0

func (c ProjectAPIKey) 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 Revision added in v0.13.0

type Revision string // Always "revision"

func (Revision) Default added in v0.13.0

func (c Revision) Default() Revision

func (Revision) MarshalJSON added in v0.13.0

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

type RevisionEvent added in v0.13.0

type RevisionEvent string // Always "revision_event"

func (RevisionEvent) Default added in v0.13.0

func (c RevisionEvent) Default() RevisionEvent

func (RevisionEvent) MarshalJSON added in v0.13.0

func (c RevisionEvent) 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)

type Usd added in v0.13.0

type Usd string // Always "USD"

func (Usd) Default added in v0.13.0

func (c Usd) Default() Usd

func (Usd) MarshalJSON added in v0.13.0

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

type UserJwt added in v0.13.0

type UserJwt string // Always "user_jwt"

func (UserJwt) Default added in v0.13.0

func (c UserJwt) Default() UserJwt

func (UserJwt) MarshalJSON added in v0.13.0

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

type UserOrgJwt added in v0.13.0

type UserOrgJwt string // Always "user_org_jwt"

func (UserOrgJwt) Default added in v0.13.0

func (c UserOrgJwt) Default() UserOrgJwt

func (UserOrgJwt) MarshalJSON added in v0.13.0

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

type UserOrgProjectJwt added in v0.13.0

type UserOrgProjectJwt string // Always "user_org_project_jwt"

func (UserOrgProjectJwt) Default added in v0.13.0

func (UserOrgProjectJwt) MarshalJSON added in v0.13.0

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

Jump to

Keyboard shortcuts

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