bigmodels

package
v1.7.7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(cfg *Config) error

func NewBigModelService

func NewBigModelService() bigmodel.BigModel

Types

type CloudConfig

type CloudConfig struct {
	Domain       string `json:"domain"                 required:"true"`
	User         string `json:"user"                   required:"true"`
	Password     string `json:"password"               required:"true"`
	Project      string `json:"project"                required:"true"`
	AuthEndpoint string `json:"auth_endpoint"          required:"true"`
}

type Config

type Config struct {
	OBS        OBSConfig   `json:"obs"             required:"true"`
	Cloud      CloudConfig `json:"cloud"           required:"true"`
	WuKong     WuKong      `json:"wukong"          required:"true"`
	Endpoints  Endpoints   `json:"endpoints"       required:"true"`
	Moderation Moderation  `json:"moderation"      required:"true"`

	MaxPictureSizeToDescribe int64 `json:"max_picture_size_to_describe"`
	MaxPictureSizeToVQA      int64 `json:"max_picture_size_to_vqa"`
}

func (*Config) SetDefault

func (cfg *Config) SetDefault()

func (*Config) Validate

func (cfg *Config) Validate() error

type Endpoints

type Endpoints struct {
	VQA              string `json:"vqa"                required:"true"`
	Pangu            string `json:"pangu"              required:"true"`
	LuoJia           string `json:"luojia"             required:"true"`
	WuKong           string `json:"wukong"             required:"true"`
	CodeGeex         string `json:"codegeex"           required:"true"`
	DescPicture      string `json:"desc_picture"       required:"true"`
	SinglePicture    string `json:"single_picture"     required:"true"`
	MultiplePictures string `json:"multiple_pictures"  required:"true"`
}

type Moderation

type Moderation struct {
	Endpoint    string `json:"endpoint"       required:"true"`
	AccessKey   string `json:"access_key"     required:"true"`
	SecretKey   string `json:"secret_key"     required:"true"`
	IAMEndpoint string `json:"iam_endpoint"   required:"true"`
	Region      string `json:"region"         required:"true"`
}

type OBSAuthInfo

type OBSAuthInfo struct {
	Endpoint  string `json:"endpoint"                  required:"true"`
	AccessKey string `json:"access_key"                required:"true"`
	SecretKey string `json:"secret_key"                required:"true"`
}

type OBSConfig

type OBSConfig struct {
	OBSAuthInfo

	VQABucket    string `json:"vqa_bucket"             required:"true"`
	LuoJiaBucket string `json:"luo_jia_bucket"         required:"true"`
}

type WuKong

type WuKong struct {
	WuKongSample
	CloudConfig
	OBSAuthInfo

	Bucket string `json:"bucket"             required:"true"`

	// DownloadExpiry specifies the timeout to download a obs file.
	// The unit is second.
	DownloadExpiry int `json:"download_expiry"`
}

type WuKongSample

type WuKongSample struct {
	SampleId    string `json:"sample_id"     required:"true"`
	SampleNum   int    `json:"sample_num"    required:"true"`
	SampleCount int    `json:"sample_count"  required:"true"`
}

Jump to

Keyboard shortcuts

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