Documentation ¶
Index ¶
- Variables
- func Chat(msg string, opts ...aispec.AIConfigOption) (string, error)
- func ChatGLM(opts ...aispec.AIConfigOption) aispec.AIClient
- func FunctionCall(input string, funcs any, opts ...aispec.AIConfigOption) (map[string]any, error)
- func GetAI(t string, opts ...aispec.AIConfigOption) aispec.AIClient
- func GetPrimaryAgent() aispec.AIClient
- func HaveAI(t string) bool
- func Moonshot(opts ...aispec.AIConfigOption) aispec.AIClient
- func OpenAI(opts ...aispec.AIConfigOption) aispec.AIClient
- type Gateway
- func (g *Gateway) Chat(s string, f ...aispec.Function) (string, error)
- func (g *Gateway) ChatEx(details []aispec.ChatDetail, function ...aispec.Function) ([]aispec.ChatChoice, error)
- func (g *Gateway) ChatStream(s string) (io.Reader, error)
- func (g *Gateway) ExtractData(msg string, desc string, fields map[string]any) (map[string]any, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var Exports = map[string]any{ "OpenAI": OpenAI, "ChatGLM": ChatGLM, "Moonshot": Moonshot, "Chat": Chat, "FunctionCall": FunctionCall, "timeout": aispec.WithTimeout, "proxy": aispec.WithProxy, "model": aispec.WithModel, "apiKey": aispec.WithAPIKey, "noHttps": aispec.WithNoHttps, "funcCallRetryTimes": aispec.WithFunctionCallRetryTimes, "domain": aispec.WithDomain, "baseURL": aispec.WithBaseURL, "onStream": aispec.WithStreamHandler, "debugStream": aispec.WithDebugStream, "type": aispec.WithType, }
Functions ¶
func FunctionCall ¶
func GetPrimaryAgent ¶
Types ¶
type Gateway ¶
func NewGateway ¶
func NewGateway() *Gateway
func (*Gateway) ChatEx ¶
func (g *Gateway) ChatEx(details []aispec.ChatDetail, function ...aispec.Function) ([]aispec.ChatChoice, error)
Click to show internal directories.
Click to hide internal directories.