Finish moving types

This commit is contained in:
mudler
2025-03-23 21:17:59 +01:00
committed by Ettore Di Giacinto
parent f0b8bfb4f4
commit 75a8d63e83
50 changed files with 568 additions and 467 deletions

View File

@@ -1,6 +1,10 @@
package action
import "context"
import (
"context"
"github.com/mudler/LocalAgent/core/types"
)
// StopActionName is the name of the action
// used by the LLM to stop any further action
@@ -12,16 +16,16 @@ func NewStop() *StopAction {
type StopAction struct{}
func (a *StopAction) Run(context.Context, ActionParams) (ActionResult, error) {
return ActionResult{}, nil
func (a *StopAction) Run(context.Context, types.ActionParams) (types.ActionResult, error) {
return types.ActionResult{}, nil
}
func (a *StopAction) Plannable() bool {
return false
}
func (a *StopAction) Definition() ActionDefinition {
return ActionDefinition{
func (a *StopAction) Definition() types.ActionDefinition {
return types.ActionDefinition{
Name: StopActionName,
Description: "Use this tool to stop any further action and stop the conversation. You must use this when it looks like there is a conclusion to the conversation or the topic diverged too much from the original conversation. For instance if the user offer his help and you already replied with a message, you can use this tool to stop the conversation.",
}