Documentation ¶
Index ¶
- Constants
- Variables
- type LLM
- func (lm *LLM) Ask(messages []llm.ChatMessage, config llm.ChatConfig, ...) (string, llm.Usage, error)
- func (lm *LLM) BatterAsk(messages []llm.ChatMessage, callback func(answer string)) (string, llm.Usage, error)
- func (lm *LLM) BestAsk(messages []llm.ChatMessage, callback func(answer string)) (string, llm.Usage, error)
- func (lm *LLM) BestEmbedding(text string) ([]byte, llm.Usage, error)
- func (lm *LLM) BestMakeImage(prompt string, config llm.GCConfig) ([]string, llm.Usage, error)
- func (lm *LLM) BestMakeVideo(prompt string, config llm.GCConfig) ([]string, []string, llm.Usage, error)
- func (lm *LLM) BestMultiAsk(messages []llm.ChatMessage, callback func(answer string)) (string, llm.Usage, error)
- func (lm *LLM) CodeInterpreterAsk(messages []llm.ChatMessage, callback func(answer string)) (string, llm.Usage, error)
- func (lm *LLM) Embedding(text, model string) ([]byte, llm.Usage, error)
- func (lm *LLM) FastAsk(messages []llm.ChatMessage, callback func(answer string)) (string, llm.Usage, error)
- func (lm *LLM) FastEmbedding(text string) ([]byte, llm.Usage, error)
- func (lm *LLM) FastMakeImage(prompt string, config llm.GCConfig) ([]string, llm.Usage, error)
- func (lm *LLM) FastMakeVideo(prompt string, config llm.GCConfig) ([]string, []string, llm.Usage, error)
- func (lm *LLM) LongAsk(messages []llm.ChatMessage, callback func(answer string)) (string, llm.Usage, error)
- func (lm *LLM) MakeImage(prompt string, config llm.GCConfig) ([]string, llm.Usage, error)
- func (lm *LLM) MakeVideo(prompt string, config llm.GCConfig) ([]string, []string, llm.Usage, error)
- func (lm *LLM) MultiAsk(messages []llm.ChatMessage, callback func(answer string)) (string, llm.Usage, error)
- func (lm *LLM) Support() llm.Support
- func (lm *LLM) WebSearchAsk(messages []llm.ChatMessage, callback func(answer string)) (string, llm.Usage, error)
Constants ¶
View Source
const ( ModelGLM4Plus = "GLM-4-Plus" ModelGLM40520 = "GLM-4-0520" ModelGLM4Long = "GLM-4-Long" ModelGLM4AirX = "GLM-4-AirX" ModelGLM4Air = "GLM-4-Air" ModelGLM4Flash = "GLM-4-Flash" ModelGLM4AllTools = "GLM-4-AllTools" ModelGLM4 = "GLM-4" ModelGLM4VPlus = "GLM-4V-Plus" ModelGLM4V = "GLM-4V" ModelCogVideoX = "CogVideoX" ModelCogView3Plus = "CogView-3-Plus" ModelCogView3 = "CogView-3" ModelEmbedding3 = "Embedding-3" ModelEmbedding2 = "Embedding-2" ModelCharGLM3 = "CharGLM-3" ModelEmohaa = "Emohaa" ModelCodeGeeX4 = "CodeGeeX-4" )
Variables ¶
View Source
var NameMap = map[string]string{ llm.TypeText: zhipu.MultiContentTypeText, llm.TypeImage: zhipu.MultiContentTypeImageURL, llm.RoleSystem: zhipu.RoleSystem, llm.RoleUser: zhipu.RoleUser, llm.RoleAssistant: zhipu.RoleAssistant, llm.RoleTool: zhipu.RoleTool, }
Functions ¶
This section is empty.
Types ¶
type LLM ¶
type LLM struct {
// contains filtered or unexported fields
}
func (*LLM) Ask ¶
func (lm *LLM) Ask(messages []llm.ChatMessage, config llm.ChatConfig, callback func(answer string)) (string, llm.Usage, error)
func (*LLM) BestMakeImage ¶
func (*LLM) BestMakeVideo ¶
func (*LLM) BestMultiAsk ¶
func (*LLM) CodeInterpreterAsk ¶
func (*LLM) FastMakeImage ¶
func (*LLM) FastMakeVideo ¶
func (*LLM) WebSearchAsk ¶
Click to show internal directories.
Click to hide internal directories.