fix: unified_search + ai_proactive get API key from DB, fix model names for Ollama Cloud
- query_understanding.py: get API key/base_url/provider_type from ai_providers DB - embedding.py: get API key from DB, pass db+tenant_id through call chain - routes.py: pass db+tenant_id to llm_analyze_query and llm_aggregate_results - search_engine.py: pass db+tenant_id to generate_embedding - unified_search/jobs.py: pass db+tenant_id to generate_embedding - Fix all default model names: ollama/deepseek-v4 -> ollama/deepseek-v4-flash - Ollama Cloud has no embedding endpoint; embedding calls fail gracefully
This commit is contained in:
@@ -95,7 +95,7 @@ async def hybrid_search(
|
||||
query_text = normalized_query
|
||||
if semantic_terms:
|
||||
query_text = f"{normalized_query} {' '.join(semantic_terms)}"
|
||||
query_embedding = await generate_embedding(query_text)
|
||||
query_embedding = await generate_embedding(query_text, db=db, tenant_id=tenant_id)
|
||||
|
||||
all_results: list[dict[str, Any]] = []
|
||||
fetch_limit = limit * 2
|
||||
|
||||
Reference in New Issue
Block a user