chat_bot

package
v1.0.68 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatBotService

type ChatBotService struct {
	Functions map[string]any
	// contains filtered or unexported fields
}

func NewChatBotService

func NewChatBotService(ctx *context.ERPContext, redisService *redis.RedisService, aiGenerator *ai_generator.AiGeneratorService) *ChatBotService

func (*ChatBotService) RegisterFunction

func (e *ChatBotService) RegisterFunction(name string, fn any)

func (*ChatBotService) RunChatBot

func (e *ChatBotService) RunChatBot(
	body objects.MsgObject,
	redisKey,
	userMsg string,
	chatbotFlow *models.ChatbotFlow,
	responseToUser func(sender, userMsg, response, redisKey string),
	generateAiContent func(generator *ai_generator.AiGenerator, agent *models.AiAgentModel, sender, redisKey, userMsg string) (*objects.AiResponse, error),
) error

Jump to

Keyboard shortcuts

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