langchain/tests/unit_tests/callbacks
Tim Conkling c28990d871
StreamlitCallbackHandler (#6315)
A new implementation of `StreamlitCallbackHandler`. It formats Agent
thoughts into Streamlit expanders.

You can see the handler in action here:
https://langchain-mrkl.streamlit.app/

Per a discussion with Harrison, we'll be adding a
`StreamlitCallbackHandler` implementation to an upcoming
[Streamlit](https://github.com/streamlit/streamlit) release as well, and
will be updating it as we add new LLM- and LangChain-specific features
to Streamlit.

The idea with this PR is that the LangChain `StreamlitCallbackHandler`
will "auto-update" in a way that keeps it forward- (and backward-)
compatible with Streamlit. If the user has an older Streamlit version
installed, the LangChain `StreamlitCallbackHandler` will be used; if
they have a newer Streamlit version that has an updated
`StreamlitCallbackHandler`, that implementation will be used instead.

(I'm opening this as a draft to get the conversation going and make sure
we're on the same page. We're really excited to land this into
LangChain!)

#### Who can review?

@agola11, @hwchase17
2023-06-22 13:14:28 -07:00
..
tracers nc/load (#5733) 2023-06-11 15:51:28 -07:00
__init__.py Add BaseCallbackHandler and CallbackManager (#478) 2023-01-04 07:54:25 -08:00
fake_callback_handler.py Add on_chat_message_start (#4499) 2023-05-11 11:06:39 -07:00
test_callback_manager.py Add support for tags (#5898) 2023-06-13 12:30:59 -07:00
test_openai_info.py fixing total cost finetuned model giving zero (#5144) 2023-05-24 10:04:08 -07:00
test_schemas.py Use Run object from SDK (#6067) 2023-06-13 07:14:11 -07:00
test_streamlit_callback.py StreamlitCallbackHandler (#6315) 2023-06-22 13:14:28 -07:00