Documentation ¶
Index ¶
- Constants
- type GLMClient
- func (g *GLMClient) BuildHTTPOptions() ([]poc.PocConfigOption, error)
- func (g *GLMClient) Chat(s string, f ...aispec.Function) (string, error)
- func (g *GLMClient) ChatEx(details []aispec.ChatDetail, function ...aispec.Function) ([]aispec.ChatChoice, error)
- func (g *GLMClient) ExtractData(msg string, desc string, fields map[string]string) (map[string]any, error)
- func (g *GLMClient) LoadOption(opt ...aispec.AIConfigOption)
- type ModelAPI
Constants ¶
View Source
const ( BaseURL = "https://open.bigmodel.cn/api/paas/v4/chat/completions" APITimeout = 300 * time.Second )
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) ChatEx ¶
func (g *GLMClient) ChatEx(details []aispec.ChatDetail, function ...aispec.Function) ([]aispec.ChatChoice, error)
func (*GLMClient) ExtractData ¶
func (*GLMClient) LoadOption ¶
func (g *GLMClient) LoadOption(opt ...aispec.AIConfigOption)
Click to show internal directories.
Click to hide internal directories.