fix(backend): implement step 1 — llama config from env vars

This commit is contained in:
2026-03-27 03:01:53 -03:00
parent bb47bf25c5
commit 1bd6c85fa8
3 changed files with 8 additions and 4 deletions

View File

@@ -26,6 +26,10 @@ IMAP_INBOX_FOLDER=INBOX
OPENAI_API_KEY=sk-replace-me
OPENAI_MODEL=gpt-4o
# ── Llama / Ollama (backend preview generation) ───────────────────────────────
LLAMA_BASE_URL=http://celtinha.desktop:11434
LLAMA_MODEL=gemma3:4b
# ── Application ───────────────────────────────────────────────────────────────
APP_RECIPIENTS=friend1@example.com,friend2@example.com

View File

@@ -10,8 +10,8 @@ import org.springframework.web.client.RestClient
@Service
class LlamaPreviewService(
private val restClient: RestClient,
@Value("\${llama.base-url:http://localhost:11434}") private val baseUrl: String,
@Value("\${llama.model:gemma3:4b}") private val model: String
@Value("\${llama.base-url}") private val baseUrl: String,
@Value("\${llama.model}") private val model: String
) {
/**

View File

@@ -49,8 +49,8 @@ openai:
model: ${OPENAI_MODEL:gpt-4o}
llama:
base-url: ${LLAMA_BASE_URL:http://localhost:11434}
model: ${LLAMA_MODEL:gemma3:4b}
base-url: ${LLAMA_BASE_URL}
model: ${LLAMA_MODEL}
springdoc:
swagger-ui: