Documentation
¶
Index ¶
- func ChatModel(ctx context.Context, modelName string) (model.ChatModel, error)
- func CountMessageTokens(messages []*schema.Message) (int, error)
- func CountToken(text string) int
- func DefaultMultiChatTemplate() prompt.ChatTemplate
- func DefaultTemplate() prompt.ChatTemplate
- func Generate(ctx context.Context, llm model.ChatModel, in []*schema.Message) (*schema.Message, error)
- func LLMGenerate(ctx context.Context, prompt string) (string, error)
- func Model() string
- func ReactAgent(ctx context.Context, tools []tool.BaseTool) (*react.Agent, error)
- func Stream(ctx context.Context, llm model.ChatModel, in []*schema.Message) (*schema.StreamReader[*schema.Message], error)
- func ToolcallModel() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CountMessageTokens ¶ added in v0.28.11
func CountToken ¶ added in v0.28.11
func DefaultMultiChatTemplate ¶ added in v0.27.1
func DefaultMultiChatTemplate() prompt.ChatTemplate
func DefaultTemplate ¶
func DefaultTemplate() prompt.ChatTemplate
func LLMGenerate ¶ added in v0.28.1
func ToolcallModel ¶
func ToolcallModel() string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.