mirror of
https://github.com/hwchase17/langchain
synced 2024-10-29 17:07:25 +00:00
6cdd4b5edc
When using callbacks, there are times when callbacks can be added redundantly: for instance sometimes you might need to create an llm with specific callbacks, but then also create and agent that uses a chain that has those callbacks already set. This means that "callbacks" might get passed down again to the llm at predict() time, resulting in duplicate calls to the `on_llm_start` callback. For the sake of simplicity, I made it so that langchain never adds an exact handler/callbacks object in `add_handler`, thus avoiding the duplicate handler issue. Tagging @hwchase17 for callback review --------- Co-authored-by: Bagatur <baskaryan@gmail.com> |
||
---|---|---|
.. | ||
tracers | ||
__init__.py | ||
fake_callback_handler.py | ||
test_callback_manager.py | ||
test_openai_info.py | ||
test_schemas.py | ||
test_streamlit_callback.py |