wip: noaction for deciding to stop
This commit is contained in:
22
action/noreply.go
Normal file
22
action/noreply.go
Normal 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.",
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user