feat: add OrcaRouter embedder for hosted semantic search
Add a named OrcaRouterEmbedder mirroring the existing OpenRouterEmbedder: a production AI gateway that proxies 200+ models on one OpenAI-compatible endpoint (https://api.orcarouter.ai/v1). Selecting it is a one-line switch: set ORCAROUTER_API_KEY instead of OPENROUTER_API_KEY. - get_embedder() prefers OrcaRouter when ORCAROUTER_API_KEY is present - is_semantic_search_available() now also enables on OrcaRouter keys - document the new option in README (Alternatif 3) and .env.example Co-Authored-By: Claude <noreply@anthropic.com> Signed-off-by: jinhao.song <jinhao.song@myflashcloud.com>
This commit is contained in:
+14
-2
@@ -75,11 +75,12 @@ JWT_SECRET_KEY=your_jwt_secret_key_here
|
||||
# =============================================================================
|
||||
|
||||
# Embedding provider for the semantic_search tool.
|
||||
# Pick exactly one of: OpenRouter (hosted) or Local (your own server).
|
||||
# Pick exactly one of: OpenRouter (hosted), OrcaRouter (hosted), or Local.
|
||||
|
||||
# --- Option A: OpenRouter (hosted, default) -----------------------------------
|
||||
# Get your API key from: https://openrouter.ai/keys
|
||||
# If neither this nor EMBEDDING_PROVIDER=local is set, semantic search is off.
|
||||
# If neither this, nor ORCAROUTER_API_KEY, nor EMBEDDING_PROVIDER=local is set,
|
||||
# semantic search is off.
|
||||
OPENROUTER_API_KEY=sk-or-v1-your_openrouter_api_key_here
|
||||
|
||||
# Optional: override the OpenRouter embedding model and dimension.
|
||||
@@ -89,6 +90,17 @@ OPENROUTER_API_KEY=sk-or-v1-your_openrouter_api_key_here
|
||||
# OPENROUTER_EMBEDDING_MODEL=google/gemini-embedding-001
|
||||
# OPENROUTER_EMBEDDING_DIMENSION=3072
|
||||
|
||||
# --- Option A2: OrcaRouter (hosted) ------------------------------------------
|
||||
# OrcaRouter is a production AI gateway with one OpenAI-compatible endpoint
|
||||
# (https://api.orcarouter.ai/v1). Get your API key from: https://www.orcarouter.ai
|
||||
# Set ORCAROUTER_API_KEY instead of OPENROUTER_API_KEY to use it.
|
||||
# ORCAROUTER_API_KEY=sk-orca-your_orcarouter_api_key_here
|
||||
|
||||
# Optional: override the OrcaRouter embedding model and dimension.
|
||||
# Defaults: google/gemini-embedding-001 at 3072 dims (multilingual).
|
||||
# ORCAROUTER_EMBEDDING_MODEL=google/gemini-embedding-001
|
||||
# ORCAROUTER_EMBEDDING_DIMENSION=3072
|
||||
|
||||
# --- Option B: Local OpenAI-compatible server (no API key required) ----------
|
||||
# Recommended for Turkish: intfloat/multilingual-e5-large served by HuggingFace
|
||||
# Text Embeddings Inference (TEI). One-line setup:
|
||||
|
||||
Reference in New Issue
Block a user