Closed eliasecchig closed 1 month ago
Following up on https://github.com/langchain-ai/langchain-google/pull/534/files
Fixes behaviour when using astream_events and stream methods, which requires merging together metadata where some of the chunks might contain "nan" Float values.
e.g
left = {'avg_logprobs': 0.0, 'safety_ratings': []} others = {'avg_logprobs': nan, 'safety_ratings': []}
E TypeError: Additional kwargs key avg_logprobs already exists in left dict and value has unsupported type <class 'float'>.
We introduce a generic integration test with langraph to catch this kind of errors in the future for any metadata field.
Following up on https://github.com/langchain-ai/langchain-google/pull/534/files
Fixes behaviour when using astream_events and stream methods, which requires merging together metadata where some of the chunks might contain "nan" Float values.
e.g
E TypeError: Additional kwargs key avg_logprobs already exists in left dict and value has unsupported type <class 'float'>.
We introduce a generic integration test with langraph to catch this kind of errors in the future for any metadata field.