We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 52741e2 + d850541 commit 6858adcCopy full SHA for 6858adc
2 files changed
pyproject.toml
@@ -1,6 +1,6 @@
1
[tool.poetry]
2
name = "modelsmith"
3
-version = "0.2.1"
+version = "0.2.2"
4
description = "Get Pydantic models and Python types as LLM responses from Google Vertex AI models."
5
authors = ["Christo Olivier <mail@christoolivier.com>"]
6
maintainers = ["Christo Olivier <mail@christoolivier.com>"]
src/modelsmith/forge.py
@@ -158,8 +158,9 @@ def _process_response(
158
except ValidationError as e:
159
exceptions.append(e)
160
161
- # Raise any errors that occurred during the JSON validation
162
- if exceptions:
+ # Raise any errors that occurred during the JSON validation if a valid model
+ # was not returned
163
+ if exceptions and model is None:
164
raise CombinedException(exceptions)
165
166
return model
0 commit comments