ai

package
v1.3.3-beta6 Latest Latest
Warning

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

Go to latest
Published: May 6, 2024 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

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,
	"domain":      aispec.WithDomain,
	"baseURL":     aispec.WithBaseURL,
	"onStream":    aispec.WithStreamHandler,
	"debugStream": aispec.WithDebugStream,
	"type":        aispec.WithType,
}

Functions

func Chat

func Chat(msg string, opts ...aispec.AIConfigOption) (string, error)

func ChatGLM

func ChatGLM(opts ...aispec.AIConfigOption) aispec.AIGateway

func FunctionCall

func FunctionCall(input string, funcs any, opts ...aispec.AIConfigOption) (map[string]any, error)

func GetAI

func GetAI(t string, opts ...aispec.AIConfigOption) aispec.AIGateway

func GetPrimaryAgent

func GetPrimaryAgent() aispec.AIGateway

func HaveAI

func HaveAI(t string) bool

func Moonshot

func Moonshot(opts ...aispec.AIConfigOption) aispec.AIGateway

func OpenAI

func OpenAI(opts ...aispec.AIConfigOption) aispec.AIGateway

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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