ai_dto

package
v1.4.1-beta Latest Latest
Warning

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

Go to latest
Published: Jan 14, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIItem

type APIItem struct {
	Id          string         `json:"id"`
	Name        string         `json:"name"`
	Service     auto.Label     `json:"service" aolabel:"service"`
	Team        auto.Label     `json:"team" aolabel:"team"`
	Method      string         `json:"method"`
	RequestPath string         `json:"request_path"`
	Model       auto.Label     `json:"model"`
	UpdateTime  auto.TimeLabel `json:"update_time"`
	UseToken    int            `json:"use_token"`
	Disable     bool           `json:"disable"`
}

type BackupProvider

type BackupProvider struct {
	Id    string     `json:"id"`
	Name  string     `json:"name"`
	Model *BasicInfo `json:"model,omitempty"`
}

type BasicInfo

type BasicInfo struct {
	Id   string `json:"id"`
	Name string `json:"name"`
}

type Condition

type Condition struct {
	Models   []*BasicInfo `json:"models"`
	Services []*BasicInfo `json:"services"`
}

type ConfiguredProviderItem

type ConfiguredProviderItem struct {
	Id         string         `json:"id"`
	Name       string         `json:"name"`
	DefaultLLM string         `json:"default_llm"`
	Status     ProviderStatus `json:"status"`
	APICount   int64          `json:"api_count"`
	KeyCount   int            `json:"key_count"`
	KeyStatus  []*KeyStatus   `json:"keys"`
	Priority   int            `json:"priority"`
}

type KeyStatus

type KeyStatus struct {
	Id       string `json:"id"`
	Name     string `json:"name"`
	Status   string `json:"status"`
	Priority int    `json:"-"`
}

type LLMItem

type LLMItem struct {
	Id     string   `json:"id"`
	Config string   `json:"config"`
	Scopes []string `json:"scopes"`
}

type Provider

type Provider struct {
	Id               string         `json:"id"`
	Name             string         `json:"name"`
	Config           string         `json:"config"`
	GetAPIKeyUrl     string         `json:"get_apikey_url"`
	DefaultLLM       string         `json:"default_llm"`
	DefaultLLMConfig string         `json:"-"`
	Priority         int            `json:"priority"`
	Status           ProviderStatus `json:"status"`
	Configured       bool           `json:"configured"`
}

type ProviderItem

type ProviderItem struct {
	Id         string `json:"id"`
	Name       string `json:"name"`
	DefaultLLM string `json:"default_llm"`
	Sort       int    `json:"-"`
}

type ProviderStatus

type ProviderStatus string
var (
	ProviderEnabled  ProviderStatus = "enabled"
	ProviderDisabled ProviderStatus = "disabled"
	ProviderAbnormal ProviderStatus = "abnormal"
)

func ToProviderStatus

func ToProviderStatus(status int) ProviderStatus

func (ProviderStatus) Int

func (p ProviderStatus) Int() int

func (ProviderStatus) String

func (p ProviderStatus) String() string

type SimpleProvider

type SimpleProvider struct {
	Id            string `json:"id"`
	Name          string `json:"name"`
	DefaultConfig string `json:"default_config"`
	GetAPIKeyUrl  string `json:"get_apikey_url"`
}

type SimpleProviderItem

type SimpleProviderItem struct {
	Id            string         `json:"id"`
	Name          string         `json:"name"`
	Configured    bool           `json:"configured"`
	DefaultConfig string         `json:"default_config"`
	Status        ProviderStatus `json:"status"`
	Model         *BasicInfo     `json:"model,omitempty"`
	Priority      int            `json:"-"`
}

type Sort

type Sort struct {
	Providers []string `json:"providers"`
}

type UpdateConfig

type UpdateConfig struct {
	DefaultLLM string `json:"default_llm"`
	Config     string `json:"config"`
	Priority   *int   `json:"priority"`
	Enable     *bool  `json:"enable"`
}

type UpdateLLM

type UpdateLLM struct {
	LLM string `json:"llm"`
}

Jump to

Keyboard shortcuts

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