model

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2025 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Levels = []Level{L1, L2, L3, Image, TTS}

Functions

This section is empty.

Types

type Feature

type Feature string

type InputType

type InputType string

type Level

type Level = string

Level represents the "intelligence" level of the model. i.e. basic, regular, advanced for example, OpenAI: gpt-4.1-mini, gpt-4.1, o3

const (
	// any of L1/L2/L3
	Any Level = "any"

	L1 Level = "L1"
	L2 Level = "L2"
	L3 Level = "L3"
	//
	Image Level = "image"
	TTS   Level = "tts"
)

type Model

type Model struct {
	Features map[Feature]bool `yaml:"features" json:"features"`

	// output
	Type OutputType `yaml:"type" json:"type"`

	Provider string `yaml:"provider" json:"provider"`
	Model    string `yaml:"model" json:"model"`

	BaseUrl string `yaml:"base_url" json:"baseUrl"`
	ApiKey  string `yaml:"api_key" json:"apiKey"`
}

func (*Model) Clone

func (r *Model) Clone() *Model

type ModelsConfig

type ModelsConfig struct {
	Alias string `yaml:"alias" json:"alias"`

	// model
	Model string `yaml:"model" json:"model"`

	// default for Models
	Provider string `yaml:"provider" json:"provider"`
	BaseUrl  string `yaml:"base_url" json:"baseUrl"`
	ApiKey   string `yaml:"api_key" json:"apiKey"`

	Models map[Level]*Model `yaml:"models" json:"models"`
}

type OutputType

type OutputType string
const (

	//
	OutputTypeUnknown OutputType = ""
	OutputTypeText    OutputType = "text"
	OutputTypeImage   OutputType = "image"
)

Jump to

Keyboard shortcuts

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