Merge branch 'main' of https://git.ttcorp.net/admin/orangepi-rag
Merge manual edit
This commit is contained in:
@@ -1,14 +1,10 @@
|
||||
# LLM API Configuration
|
||||
# Get your API key from:
|
||||
# - OpenAI: https://platform.openai.com/api-keys
|
||||
# - Together.ai: https://api.together.xyz/settings/api-keys
|
||||
# - Groq: https://console.groq.com/keys
|
||||
# - Or any OpenAI-compatible API
|
||||
|
||||
OPENAI_API_KEY=your_api_key_here
|
||||
# Get your API key from https://platform.openai.com/api-keys
|
||||
# Or use any OpenAI-compatible API (e.g., Together.ai, Groq, etc.)
|
||||
OPENAI_API_KEY=sk-QHX7EZodq0EBuJyRX
|
||||
|
||||
# Optional: Custom base URL for OpenAI-compatible APIs
|
||||
# LLM_BASE_URL=https://api.openai.com/v1
|
||||
LLM_BASE_URL=http://192.168.88.5:8317/v1
|
||||
|
||||
# Optional: Model name (default: gpt-4o-mini)
|
||||
# LLM_MODEL=gpt-4o-mini
|
||||
LLM_MODEL=gpt-5.4-mini
|
||||
+13
-1
@@ -285,7 +285,19 @@ def main():
|
||||
print(" Or use --retrieve-only to test retrieval without LLM")
|
||||
return 1
|
||||
|
||||
llm = LLMClient(api_key, args.llm_base_url, args.llm_model)
|
||||
llm_base_url = os.environ.get("LLM_BASE_URL") or args.llm_base_url
|
||||
if not llm_base_url:
|
||||
print("ERROR: Set LLM_BASE_URL or --llm_base_url in environment or .env file")
|
||||
print(" Or use --retrieve-only to test retrieval without LLM")
|
||||
return 1
|
||||
|
||||
llm_model = os.environ.get("LLM_MODEL") or args.llm_model
|
||||
if not llm_model:
|
||||
print("ERROR: Set LLM_MODEL or --llm_model in environment or .env file")
|
||||
print(" Or use --retrieve-only to test retrieval without LLM")
|
||||
return 1
|
||||
|
||||
llm = LLMClient(api_key, llm_base_url, llm_model)
|
||||
pipeline = RAGPipeline(args.data_dir, args.index_dir, embedder, llm, args.top_k)
|
||||
|
||||
if args.build:
|
||||
|
||||
Reference in New Issue
Block a user