Spaces:
Running
Running
Update src/generation/llm.py
Browse files- src/generation/llm.py +2 -0
src/generation/llm.py
CHANGED
@@ -105,6 +105,8 @@ class LLM:
|
|
105 |
response = " ".join(response.split()).strip()
|
106 |
print("Response generated successfully!")
|
107 |
return response
|
|
|
|
|
108 |
|
109 |
def format_query_prompt(self, query: str, cuisines: List[str], dishes: List[str], price_ranges: List[str]) -> str:
|
110 |
"""
|
|
|
105 |
response = " ".join(response.split()).strip()
|
106 |
print("Response generated successfully!")
|
107 |
return response
|
108 |
+
except Exception as e:
|
109 |
+
raise RuntimeError(f"Failed to generate response: {str(e)}")
|
110 |
|
111 |
def format_query_prompt(self, query: str, cuisines: List[str], dishes: List[str], price_ranges: List[str]) -> str:
|
112 |
"""
|