mirror of
https://github.com/prosolis/gogobee.git
synced 2026-09-14 10:51:09 +00:00
llm: route every LLM caller through a shared backend client
Replaces the per-plugin Ollama HTTP calls with internal/llm, which picks a backend from the environment (vLLM or Ollama) behind one Chat interface, plus internal/plugin/llm_client.go as the plugin-facing wrapper. Startup now logs llm_backend/llm_endpoint/llm_model instead of the two OLLAMA_* vars, which no longer describe where inference actually goes. These files were already running in prod from the vLLM migration but had never been committed; this is that live state, byte-for-byte.
This commit is contained in:
@@ -13,6 +13,7 @@ import (
|
||||
"gogobee/internal/bot"
|
||||
"gogobee/internal/db"
|
||||
"gogobee/internal/dreamclient"
|
||||
"gogobee/internal/llm"
|
||||
"gogobee/internal/peteclient"
|
||||
"gogobee/internal/plugin"
|
||||
"gogobee/internal/util"
|
||||
@@ -37,9 +38,11 @@ func main() {
|
||||
logLevel = "info"
|
||||
}
|
||||
util.InitLogger(logLevel)
|
||||
llmCfg := llm.ConfigFromEnv()
|
||||
slog.Info(version.Full(), "level", logLevel,
|
||||
"ollama_host", os.Getenv("OLLAMA_HOST"),
|
||||
"ollama_model", os.Getenv("OLLAMA_MODEL"))
|
||||
"llm_backend", llmCfg.Backend,
|
||||
"llm_endpoint", llmCfg.Endpoint,
|
||||
"llm_model", llmCfg.Model)
|
||||
|
||||
dataDir := os.Getenv("DATA_DIR")
|
||||
if dataDir == "" {
|
||||
|
||||
Reference in New Issue
Block a user