fix: allow api call in stream route + get_prompt error

This commit is contained in:
Siddhant Rai
2025-07-25 16:17:18 +05:30
parent 76973a4b4c
commit 212952f3e9
3 changed files with 3 additions and 4 deletions

View File

@@ -41,7 +41,7 @@ def get_prompt(prompt_id: str, prompts_collection=None) -> str:
except FileNotFoundError:
raise FileNotFoundError(f"Prompt file not found: {file_path}")
try:
if not prompts_collection:
if prompts_collection is None:
mongo = MongoDB.get_client()
db = mongo[settings.MONGO_DB_NAME]
prompts_collection = db["prompts"]