wip: noaction for deciding to stop

This commit is contained in:
mudler
2024-04-14 16:38:45 +02:00
parent 27f7299749
commit ac8f6e94ff
9 changed files with 82 additions and 15 deletions

22
action/noreply.go Normal file
View File

@@ -0,0 +1,22 @@
package action
// StopActionName is the name of the action
// used by the LLM to stop any further action
const StopActionName = "stop"
func NewStop() *StopAction {
return &StopAction{}
}
type StopAction struct{}
func (a *StopAction) Run(ActionParams) (string, error) {
return "no-op", nil
}
func (a *StopAction) Definition() ActionDefinition {
return ActionDefinition{
Name: StopActionName,
Description: "Use this tool to stop any further action and stop the conversation.",
}
}