chatglm

package
v1.3.4-alpha0723 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	APITokenTTLSeconds = 3 * 60
	APIKeyPartCount    = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type GLMClient

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

func (*GLMClient) BuildHTTPOptions

func (g *GLMClient) BuildHTTPOptions() ([]poc.PocConfigOption, error)

func (*GLMClient) Chat

func (g *GLMClient) Chat(s string, f ...aispec.Function) (string, error)

func (*GLMClient) ChatEx

func (g *GLMClient) ChatEx(details []aispec.ChatDetail, function ...aispec.Function) ([]aispec.ChatChoice, error)

func (*GLMClient) ChatStream

func (g *GLMClient) ChatStream(msg string) (io.Reader, error)

func (*GLMClient) CheckValid added in v1.3.3

func (g *GLMClient) CheckValid() error

func (*GLMClient) ExtractData

func (g *GLMClient) ExtractData(msg string, desc string, fields map[string]any) (map[string]any, error)

func (*GLMClient) LoadOption

func (g *GLMClient) LoadOption(opt ...aispec.AIConfigOption)

Jump to

Keyboard shortcuts

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