azure

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: 7 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(apiSecret string, model ModelType, modelDeploy string, opt *Option) (*LLM, error)

func (*LLM) CheckSupport

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

func (*LLM) Request

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

type LLMOld added in v0.0.5

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

func NewLLMOld added in v0.0.5

func NewLLMOld(apiSecret string, model ModelType, modelDeploy string, opt *Option) (*LLMOld, error)

func (*LLMOld) CheckSupport added in v0.0.5

func (llm *LLMOld) CheckSupport(v llms.LLMSupportType) bool

func (*LLMOld) Request added in v0.0.5

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

type ModelType

type ModelType string
const (
	ModelTypeGpt35Turbo    ModelType = "gpt-35-turbo"
	ModelTypeGpt35Turbo16k ModelType = "gpt-35-turbo-16k"
	ModelTypeGpt4Pro       ModelType = "gpt-4"
	ModelTypeGpt4Pro32K    ModelType = "gpt-4-32k"
)

type Option

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

func NewOption

func NewOption() *Option

func (*Option) SetAzureEndPoint

func (p *Option) SetAzureEndPoint(endpoint string) *Option

func (*Option) SetMaxTokens

func (p *Option) SetMaxTokens(val int32) *Option

func (*Option) SetTemperature

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

func (*Option) SetTopP

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

Jump to

Keyboard shortcuts

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