fix(backend): implement step 1 — llama config from env vars
This commit is contained in:
@@ -26,6 +26,10 @@ IMAP_INBOX_FOLDER=INBOX
|
|||||||
OPENAI_API_KEY=sk-replace-me
|
OPENAI_API_KEY=sk-replace-me
|
||||||
OPENAI_MODEL=gpt-4o
|
OPENAI_MODEL=gpt-4o
|
||||||
|
|
||||||
|
# ── Llama / Ollama (backend preview generation) ───────────────────────────────
|
||||||
|
LLAMA_BASE_URL=http://celtinha.desktop:11434
|
||||||
|
LLAMA_MODEL=gemma3:4b
|
||||||
|
|
||||||
# ── Application ───────────────────────────────────────────────────────────────
|
# ── Application ───────────────────────────────────────────────────────────────
|
||||||
APP_RECIPIENTS=friend1@example.com,friend2@example.com
|
APP_RECIPIENTS=friend1@example.com,friend2@example.com
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ import org.springframework.web.client.RestClient
|
|||||||
@Service
|
@Service
|
||||||
class LlamaPreviewService(
|
class LlamaPreviewService(
|
||||||
private val restClient: RestClient,
|
private val restClient: RestClient,
|
||||||
@Value("\${llama.base-url:http://localhost:11434}") private val baseUrl: String,
|
@Value("\${llama.base-url}") private val baseUrl: String,
|
||||||
@Value("\${llama.model:gemma3:4b}") private val model: String
|
@Value("\${llama.model}") private val model: String
|
||||||
) {
|
) {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -49,8 +49,8 @@ openai:
|
|||||||
model: ${OPENAI_MODEL:gpt-4o}
|
model: ${OPENAI_MODEL:gpt-4o}
|
||||||
|
|
||||||
llama:
|
llama:
|
||||||
base-url: ${LLAMA_BASE_URL:http://localhost:11434}
|
base-url: ${LLAMA_BASE_URL}
|
||||||
model: ${LLAMA_MODEL:gemma3:4b}
|
model: ${LLAMA_MODEL}
|
||||||
|
|
||||||
springdoc:
|
springdoc:
|
||||||
swagger-ui:
|
swagger-ui:
|
||||||
|
|||||||
Reference in New Issue
Block a user