Merge branch 'main' of https://git.ttcorp.net/admin/orangepi-rag
Merge manual edit
This commit is contained in:
+13
-1
@@ -284,8 +284,20 @@ def main():
|
||||
print("ERROR: Set OPENAI_API_KEY or LLM_API_KEY in environment or .env file")
|
||||
print(" Or use --retrieve-only to test retrieval without LLM")
|
||||
return 1
|
||||
|
||||
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, args.llm_base_url, args.llm_model)
|
||||
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