diff options
| author | Kujtim Hoxha <[email protected]> | 2025-03-27 22:35:48 +0100 |
|---|---|---|
| committer | Kujtim Hoxha <[email protected]> | 2025-04-01 13:38:54 +0200 |
| commit | afd9ad0560d76c2a6d161dad52553b10ff428905 (patch) | |
| tree | 69f78b05ff0d7952cd3e3c9332f001e66abb2faf /internal/app/services.go | |
| parent | 904061c243f70696bfe781e97bf4e392e6954d07 (diff) | |
| download | opencode-afd9ad0560d76c2a6d161dad52553b10ff428905.tar.gz opencode-afd9ad0560d76c2a6d161dad52553b10ff428905.zip | |
rework llm
Diffstat (limited to 'internal/app/services.go')
| -rw-r--r-- | internal/app/services.go | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/internal/app/services.go b/internal/app/services.go index c62d4bdd4..09c62ca71 100644 --- a/internal/app/services.go +++ b/internal/app/services.go @@ -4,13 +4,12 @@ import ( "context" "database/sql" + "github.com/kujtimiihoxha/termai/internal/config" "github.com/kujtimiihoxha/termai/internal/db" - "github.com/kujtimiihoxha/termai/internal/llm" "github.com/kujtimiihoxha/termai/internal/logging" "github.com/kujtimiihoxha/termai/internal/message" "github.com/kujtimiihoxha/termai/internal/permission" "github.com/kujtimiihoxha/termai/internal/session" - "github.com/spf13/viper" ) type App struct { @@ -19,7 +18,6 @@ type App struct { Sessions session.Service Messages message.Service Permissions permission.Service - LLM llm.Service Logger logging.Interface } @@ -27,18 +25,17 @@ type App struct { func New(ctx context.Context, conn *sql.DB) *App { q := db.New(conn) log := logging.NewLogger(logging.Options{ - Level: viper.GetString("log.level"), + Level: config.Get().Log.Level, }) sessions := session.NewService(ctx, q) messages := message.NewService(ctx, q) - llm := llm.NewService(ctx, log, sessions, messages) return &App{ Context: ctx, Sessions: sessions, Messages: messages, Permissions: permission.Default, - LLM: llm, Logger: log, } } + |
