Feat: props table instead of form
This commit is contained in:
18
bot.go
18
bot.go
@@ -32,6 +32,8 @@ var (
|
||||
cfg *config.Config
|
||||
logger *slog.Logger
|
||||
logLevel = new(slog.LevelVar)
|
||||
)
|
||||
var (
|
||||
activeChatName string
|
||||
chunkChan = make(chan string, 10)
|
||||
openAIToolChan = make(chan string, 10)
|
||||
@@ -65,6 +67,22 @@ var (
|
||||
}
|
||||
)
|
||||
|
||||
// GetLogLevel returns the current log level as a string
|
||||
func GetLogLevel() string {
|
||||
level := logLevel.Level()
|
||||
switch level {
|
||||
case slog.LevelDebug:
|
||||
return "Debug"
|
||||
case slog.LevelInfo:
|
||||
return "Info"
|
||||
case slog.LevelWarn:
|
||||
return "Warn"
|
||||
default:
|
||||
// For any other values, return "Info" as default
|
||||
return "Info"
|
||||
}
|
||||
}
|
||||
|
||||
func createClient(connectTimeout time.Duration) *http.Client {
|
||||
// Custom transport with connection timeout
|
||||
transport := &http.Transport{
|
||||
|
||||
Reference in New Issue
Block a user