Documentation
¶
Index ¶
- type Conversation
- type ConversationMgr
- type ConversationMgrOption
- type ConversationPromptConfig
- type LLMReply
- type LLMReplyConfig
- type LLMReplyOption
- func WithAPIKey(apiKey string) LLMReplyOption
- func WithAllowMsgType(allowMsgType []linebot.EventSourceType) LLMReplyOption
- func WithAllowUser(allowUser bool) LLMReplyOption
- func WithConfigFile(configFile string) LLMReplyOption
- func WithMCPBaseUrls(mcpBaseUrls []string) LLMReplyOption
- func WithModel(model string) LLMReplyOption
- func WithMongo(mongoURI string, db, collection string) LLMReplyOption
- type MemoryMongoCfg
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conversation ¶
type ConversationMgr ¶
type ConversationMgr interface {
NewConversation(ctx context.Context, sessionID string) (Conversation, error)
}
func NewConversationMgr ¶
func NewConversationMgr( llmmodel llms.Model, configFile string, mcpBaseUrls []string, opts ...ConversationMgrOption, ) (ConversationMgr, error)
type ConversationMgrOption ¶
type ConversationMgrOption func(mgr *conversationMgr)
func WithConversationMemoryMongo ¶
func WithConversationMemoryMongo(baseUrl, dbName, collectionName string) ConversationMgrOption
type LLMReply ¶
type LLMReply interface {
MessageTextReply(
ctx context.Context, typ linebot.EventSourceType,
groupID, userID, msg string, mysession sessions.Session,
) ([]linebot.SendingMessage, error)
}
func NewLLMTextReply ¶
func NewLLMTextReply( ctx context.Context, opts ...LLMReplyOption, ) (LLMReply, error)
type LLMReplyConfig ¶
type LLMReplyOption ¶
type LLMReplyOption func(cfg *LLMReplyConfig)
func WithAPIKey ¶
func WithAPIKey(apiKey string) LLMReplyOption
func WithAllowMsgType ¶
func WithAllowMsgType(allowMsgType []linebot.EventSourceType) LLMReplyOption
func WithAllowUser ¶
func WithAllowUser(allowUser bool) LLMReplyOption
func WithConfigFile ¶
func WithConfigFile(configFile string) LLMReplyOption
func WithMCPBaseUrls ¶
func WithMCPBaseUrls(mcpBaseUrls []string) LLMReplyOption
func WithModel ¶
func WithModel(model string) LLMReplyOption
func WithMongo ¶
func WithMongo(mongoURI string, db, collection string) LLMReplyOption
type MemoryMongoCfg ¶
Click to show internal directories.
Click to hide internal directories.