langchain-b12 0.1.5__py3-none-any.whl → 0.1.6__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -408,7 +408,12 @@ class ChatGenAI(BaseChatModel):
408
408
  "finish_reason": top_candidate.finish_reason,
409
409
  "finish_message": top_candidate.finish_message,
410
410
  }
411
- message = parse_response_candidate(top_candidate)
411
+ try:
412
+ message = parse_response_candidate(top_candidate)
413
+ except Exception as e:
414
+ raise ValueError(
415
+ f"Failed to parse model response: {top_candidate.finish_message}"
416
+ ) from e
412
417
  if lc_usage:
413
418
  message.usage_metadata = lc_usage
414
419
  # add model name if final chunk
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: langchain-b12
3
- Version: 0.1.5
3
+ Version: 0.1.6
4
4
  Summary: A reusable collection of tools and implementations for Langchain
5
5
  Author-email: Vincent Min <vincent.min@b12-consulting.com>
6
6
  Requires-Python: >=3.11
@@ -2,8 +2,8 @@ langchain_b12/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
2
  langchain_b12/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  langchain_b12/citations/citations.py,sha256=ZQvYayjQXIUaRosJ0qwL3Nc7kC8sBzmaIkE-BOslaVI,12261
4
4
  langchain_b12/genai/embeddings.py,sha256=od2bVIgt7v9aNAHG0PVypVF1H_XgHto2nTd8vwfvyN8,3355
5
- langchain_b12/genai/genai.py,sha256=7X7nDt76Icc5woV5b7FX_uza9YgFpFp1_PcYtXPriqE,16667
5
+ langchain_b12/genai/genai.py,sha256=r7v_Z97N_Vd0zIR5mcQrlY3eWCPWhThvOvnXg59Ls8c,16868
6
6
  langchain_b12/genai/genai_utils.py,sha256=tA6UiJURK25-11vtaX4768UV47jDCYwVKIIWydD4Egw,10736
7
- langchain_b12-0.1.5.dist-info/METADATA,sha256=unv3NxdFU_VrlPmIuTmDB2dHRi9go44B-q83kQgLUqI,1204
8
- langchain_b12-0.1.5.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
- langchain_b12-0.1.5.dist-info/RECORD,,
7
+ langchain_b12-0.1.6.dist-info/METADATA,sha256=c2_hq-9spfRCb1nNRT6ztrCf1s1KNl8lkg-tLiB0mho,1204
8
+ langchain_b12-0.1.6.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
9
+ langchain_b12-0.1.6.dist-info/RECORD,,