refactor: centralize port config + fix 8082 conflict
- Add EMBED_URL, OLLAMA_URL, LLM_HEALTH_URL to config.rs - Fix health.rs hardcoded ports → config references - Fix sync_db.rs Ollama URL → config::OLLAMA_URL - Create config/port_registry.tsv (single source of truth for ports) - Remove Caddy 8082 proxy block (port belongs to LLM) - Fix .env LLM_URL: localhost → 127.0.0.1 (avoid IPv6 Caddy conflict)
This commit is contained in:
@@ -78,7 +78,7 @@ impl SyncDb {
|
||||
pub async fn embed_text(&self, text: &str) -> Result<Vec<f32>> {
|
||||
let client = reqwest::Client::new();
|
||||
let response = client
|
||||
.post("http://localhost:11434/api/embeddings")
|
||||
.post(&format!("{}/api/embeddings", crate::core::config::OLLAMA_URL.as_str()))
|
||||
.json(&serde_json::json!({
|
||||
"model": "all-minilm",
|
||||
"prompt": text,
|
||||
|
||||
Reference in New Issue
Block a user