agents

package
v0.28.11 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2025 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ChatModel

func ChatModel(ctx context.Context, modelName string) (model.ChatModel, error)

func CountMessageTokens added in v0.28.11

func CountMessageTokens(messages []*schema.Message) (int, error)

func CountToken added in v0.28.11

func CountToken(text string) int

func DefaultMultiChatTemplate added in v0.27.1

func DefaultMultiChatTemplate() prompt.ChatTemplate

func DefaultTemplate

func DefaultTemplate() prompt.ChatTemplate

func Generate

func Generate(ctx context.Context, llm model.ChatModel, in []*schema.Message) (*schema.Message, error)

func LLMGenerate added in v0.28.1

func LLMGenerate(ctx context.Context, prompt string) (string, error)

func Model

func Model() string

func ReactAgent

func ReactAgent(ctx context.Context, tools []tool.BaseTool) (*react.Agent, error)

func ToolcallModel

func ToolcallModel() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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