Documentation
¶
Index ¶
Constants ¶
View Source
const DefaultParseIntentSystemPromptTemplate = `` /* 1477-byte string literal not displayed */
DefaultParseIntentSystemPromptTemplate is the default system prompt template used by ToolBasedIntentRecognizer. The template may contain a single "%s" placeholder for the tool name.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FailbackCommandParser ¶
type FailbackCommandParser[T any] struct { // contains filtered or unexported fields }
func NewFailbackCommandParser ¶
func NewFailbackCommandParser[T any](parsers ...Recognizer[T]) *FailbackCommandParser[T]
func (*FailbackCommandParser[T]) RecognizerIntent ¶
func (p *FailbackCommandParser[T]) RecognizerIntent(ctx context.Context, req *types.ToolRequest[T]) (Intent, error)
type LocalIntentRecognizer ¶
func NewLocalIntentRecognizer ¶
func NewLocalIntentRecognizer[T any]() *LocalIntentRecognizer[T]
func (*LocalIntentRecognizer[T]) RecognizerIntent ¶
func (p *LocalIntentRecognizer[T]) RecognizerIntent(ctx context.Context, req *types.ToolRequest[T]) (Intent, error)
type ParserOption ¶
type ParserOption[T any] func(*intentParserOptions[T])
func WithIntentPromptBuilder ¶
func WithIntentPromptBuilder[T any](promptBuilder PromptBuilder[T]) ParserOption[T]
func WithIntentSystemPromptTemplate ¶
func WithIntentSystemPromptTemplate[T any](systemPromptTemplate string) ParserOption[T]
type PromptBuilder ¶
type Recognizer ¶
type ToolBasedIntentRecognizer ¶
type ToolBasedIntentRecognizer[T any] struct { Chain *structured.Chain[*types.ToolRequest[T], parseCommandInput] }
func NewToolBasedIntentRecognizer ¶
func NewToolBasedIntentRecognizer[T any](chatModel model.ToolCallingChatModel, opts ...ParserOption[T]) (*ToolBasedIntentRecognizer[T], error)
func (*ToolBasedIntentRecognizer[T]) RecognizerIntent ¶
func (p *ToolBasedIntentRecognizer[T]) RecognizerIntent(ctx context.Context, req *types.ToolRequest[T]) (Intent, error)
Click to show internal directories.
Click to hide internal directories.