uniform logging

This commit is contained in:
Ettore Di Giacinto
2024-04-19 00:02:00 +02:00
parent 2cba2eafe6
commit 08563c3286
13 changed files with 178 additions and 108 deletions

View File

@@ -2,7 +2,6 @@ package agent
import (
"context"
"log/slog"
"strings"
"time"
)
@@ -22,7 +21,6 @@ type options struct {
userActions Actions
enableHUD, standaloneJob, showCharacter, enableKB bool
logLevel slog.Level
canStopItself bool
initiateConversations bool
characterfile string
@@ -55,7 +53,6 @@ func defaultOptions() *options {
APIURL: "http://localhost:8080",
Model: "echidna",
},
logLevel: slog.LevelInfo,
character: Character{
Name: "John Doe",
Age: "",
@@ -92,13 +89,6 @@ var CanStopItself = func(o *options) error {
return nil
}
func LogLevel(level slog.Level) Option {
return func(o *options) error {
o.logLevel = level
return nil
}
}
func WithTimeout(timeout string) Option {
return func(o *options) error {
o.timeout = timeout