Closed Tangent-90C closed 2 months ago
The logic of chunk merging is relatively complicated. I think it is possible to formulate some keys that need to be merged.
@baskaryan Please give me some suggestions and I will fix it.
Same issue. any update on this error?
Same issue. any update on this error?
It has been solved, please see the associated PR.https://github.com/langchain-ai/langchain/pull/18889
Same issue. any update on this error?
It has been solved, please see the associated PR.#18889
Thanks. Update to the latest langchain can fix this issue.
Checked other resources
Example Code
Error Message and Stack Trace (if applicable)
Traceback (most recent call last): File "E:\JMIT\JMIT3\code\ans.py", line 247, in
print(retrieve_ans_chat_stream('我想離婚,孩子該怎麼判?', history=[('你好', '你好呀')]))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\JMIT\JMIT3\code\ans.py", line 236, in retrieve_ans_chat_stream
for chunk in qianfan_model.stream(input_prompt):
File "E:\envs\JMIT\Lib\site-packages\langchain_core\language_models\chat_models.py", line 250, in stream
raise e
File "E:\envs\JMIT\Lib\site-packages\langchain_core\language_models\chat_models.py", line 241, in stream
generation += chunk
File "E:\envs\JMIT\Lib\site-packages\langchain_core\outputs\chat_generation.py", line 57, in add
generation_info = merge_dicts(
^^^^^^^^^^^^
File "E:\envs\JMIT\Lib\site-packages\langchain_core\utils_merge.py", line 38, in merge_dicts
raise TypeError(
TypeError: Additional kwargs key created already exists in left dict and value has unsupported type <class 'int'>.
Description
This bug occurs when the langchain_core>0.1.12 Downgrading to langchain_core==0.1.12 is bug-free
System Info
langchain==0.1.10 langchain-community==0.0.25 langchain-core==0.1.28 langchain-text-splitters==0.0.1
windows
Python 3.11.7