Skip to content

Commit 5ec0a41

Browse files
committed
[fix] llm_engine valueerror on completion
1 parent 7644856 commit 5ec0a41

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

edenai_apis/llmengine/llm_engine.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,8 @@ def _execute_completion(self, params: Dict, response_class: Type, **kwargs):
112112
raise ProviderException(
113113
"An error occurred while parsing the response."
114114
) from exc
115+
except ValueError as exc_v:
116+
raise ProviderException("Provider returned an empty or mal-formatted response") from exc_v
115117
standardized_response = response_class(**result)
116118
return ResponseType[response_class](
117119
original_response=response.to_dict(),

0 commit comments

Comments
 (0)