Add more actions, small fixups in the UI, add stop action
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
package action
|
||||
|
||||
import "context"
|
||||
|
||||
// StopActionName is the name of the action
|
||||
// used by the LLM to stop any further action
|
||||
const StopActionName = "stop"
|
||||
@@ -10,13 +12,13 @@ func NewStop() *StopAction {
|
||||
|
||||
type StopAction struct{}
|
||||
|
||||
func (a *StopAction) Run(ActionParams) (string, error) {
|
||||
func (a *StopAction) Run(context.Context, 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.",
|
||||
Description: "Use this tool to stop any further action and stop the conversation. You must use this when: the user wants to stop the conversation, it seems that the user does not need any additional answer, it looks like there is already a conclusion to the conversation or the topic diverged too much from the original conversation.",
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user