feat: add loop detection

Signed-off-by: mudler <mudler@localai.io>
This commit is contained in:
mudler
2025-04-09 19:13:41 +02:00
parent 1c4ab09335
commit 0eb68b6c20
6 changed files with 59 additions and 0 deletions

View File

@@ -28,6 +28,7 @@ type options struct {
canStopItself bool
initiateConversations bool
loopDetectionSteps int
forceReasoning bool
canPlan bool
characterfile string
@@ -113,6 +114,13 @@ func WithTimeout(timeout string) Option {
}
}
func WithLoopDetectionSteps(steps int) Option {
return func(o *options) error {
o.loopDetectionSteps = steps
return nil
}
}
func WithConversationsPath(path string) Option {
return func(o *options) error {
o.conversationsPath = path