skylark

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MulanPSL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type LLM

type LLM struct {
	// contains filtered or unexported fields
}

func NewLLM

func NewLLM(apiKey, apiSecret string, model ModelType, modelVer string, opt *Option) (*LLM, error)

func (*LLM) CheckSupport added in v0.0.2

func (llm *LLM) CheckSupport(_ llms.LLMSupportType) bool

func (*LLM) Request

func (llm *LLM) Request(ctx context.Context, input *llms.Input, tb llms.ToolBox) (*llms.Output, error)

type ModelType

type ModelType string
const (
	ModelTypeSkylarkLitePublic ModelType = "skylark-lite-public"
	ModelTypeSkylarkPlusPublic ModelType = "skylark-plus-public"
	ModelTypeSkylarkProPublic  ModelType = "skylark-pro-public"
	ModelTypeSkylark2Pro4k     ModelType = "Skylark2-pro-4k"
	ModelTypeSkylark2Lite8k    ModelType = "skylark2-lite-8k"
	ModelTypeSkylark2Pro32k    ModelType = "skylark2-pro-32k"

	ModelTypeMoonshot8KV1   ModelType = "moonshot-v1-8k"
	ModelTypeMoonshot32KV1  ModelType = "moonshot-v1-32k"
	ModelTypeMoonshot128KV1 ModelType = "moonshot-v1-128k"
)

type Option

type Option struct {
	// contains filtered or unexported fields
}

func NewOption

func NewOption() *Option

func (*Option) SetClient

func (op *Option) SetClient(val *http.Client) *Option

func (*Option) SetHost

func (op *Option) SetHost(val string) *Option

func (*Option) SetMaxNewTokens

func (op *Option) SetMaxNewTokens(val int64) *Option

func (*Option) SetMaxPromptTokens

func (op *Option) SetMaxPromptTokens(val int64) *Option

func (*Option) SetMinNewTokens

func (op *Option) SetMinNewTokens(val int64) *Option

func (*Option) SetRegion

func (op *Option) SetRegion(val string) *Option

func (*Option) SetTemperature

func (op *Option) SetTemperature(val float32) *Option

func (*Option) SetTopK

func (op *Option) SetTopK(val int64) *Option

func (*Option) SetTopP

func (op *Option) SetTopP(val float32) *Option

Jump to

Keyboard shortcuts

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