base

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ValidateImageFormat

func ValidateImageFormat(format string) error

func ValidateImageSize

func ValidateImageSize(size string) error

func ValidateInput

func ValidateInput(prompt interface{}) error

func ValidatePrompt

func ValidatePrompt(prompt interface{}) error

Types

type Choice

type Choice struct {
	Text         string          `json:"text"`
	Index        int64           `json:"index"`
	Logprobs     *ChoiceLogprobs `json:"logprobs"`
	FinishReason string          `json:"finish_reason"`
}

type ChoiceLogprobs

type ChoiceLogprobs struct {
	Tokens        []string      `json:"tokens"`
	TokenLogprobs []float64     `json:"token_logprobs"`
	TopLogprobs   []interface{} `json:"top_logprobs"`
	TextOffset    []int64       `json:"text_offset"`
}

type Usage

type Usage struct {
	PromptTokens     int64 `json:"prompt_tokens"`
	CompletionTokens int64 `json:"completion_tokens"`
	TotalTokens      int64 `json:"total_tokens"`
}

Jump to

Keyboard shortcuts

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