modified: blueprints/chat.py
modified: services/llm_service.py modified: services/rag_service.py modified: static/js/chat.js
This commit is contained in:
@@ -21,13 +21,14 @@ def _get_client():
|
||||
|
||||
if provider == "openai":
|
||||
api_key = current_app.config.get("OPENAI_API_KEY", "")
|
||||
_client = openai.OpenAI(api_key=api_key)
|
||||
_client = openai.OpenAI(api_key=api_key, timeout=60.0)
|
||||
else:
|
||||
# LM Studio or any OpenAI-compatible endpoint
|
||||
base_url = current_app.config.get("LM_STUDIO_URL", "http://localhost:1234")
|
||||
_client = openai.OpenAI(
|
||||
base_url=f"{base_url.rstrip('/')}/v1",
|
||||
api_key="lm-studio",
|
||||
timeout=60.0,
|
||||
)
|
||||
|
||||
return _client
|
||||
|
||||
Reference in New Issue
Block a user