https://meeting-reporter.streamlit.app/ mates Streamlit and Langgraph to create an app using both multiple agents and human-in-the-loop to generate news stories more reliably than AI can alone and more cheaply than humans can without AI. It’s an example of how AI can help fill a gap in local news reporting.
Based on GPT4-turbo so you do need your own paid OpenAI API key to get past the first screen (cost a few pennies per run).
Screenshots and transcript of a a session are here,
Most examples of Langgraph use are in Jupyter notebooks so not really suitable for deployment to a broad audience. Streamlit solves the UI problem but mating the Streamlit and Langgraph state machines is an interesting problem.
@tevslin it appears that you are not using langchain_community.callbacks.StreamlitCallbackHandler to handle the rendering of each step in the langgraph workflow. langchain_community.callbacks.StreamlitCallbackHandler is the documented method of doing this task with langchain, but the callback handler produces the following error when used with a langgraph workflow:
Error in StreamlitCallbackHandler.on_llm_end callback: RuntimeError('Current LLMThought is unexpectedly None!')
Any ideas on how to properly use langchain_community.callbacks.StreamlitCallbackHandler with langgraph? … or how to get the equivalent functionality with another approach?
Nick, As you’ve seen, I’m not familiar with langchain_community.callbacks.StreamlitCallbackHandler but will take a look at it as I upgrade this code to add more functionality.
Hey @Nick , I solved the streaming problem with LangGraph and Streamlit in the toolkit I just published today:
In my repo I run the agent in a different container with a fastapi server in between, but I believe the same principle and key code would work if the agent was running directly in the Streamlit app.
@Joshua2 the complexity of your code, even just the draw_messages function, shows how helpful it would be for streamlit to build functionality to handle the complexity of streaming output from langgraph.
Otherwise, each developer has to re-invent this code (or at least find examples from other codebases).
Thanks for stopping by! We use cookies to help us understand how you interact with our website.
By clicking “Accept all”, you consent to our use of cookies. For more information, please see our privacy policy.
Cookie settings
Strictly necessary cookies
These cookies are necessary for the website to function and cannot be switched off. They are usually only set in response to actions made by you which amount to a request for services, such as setting your privacy preferences, logging in or filling in forms.
Performance cookies
These cookies allow us to count visits and traffic sources so we can measure and improve the performance of our site. They help us understand how visitors move around the site and which pages are most frequently visited.
Functional cookies
These cookies are used to record your choices and settings, maintain your preferences over time and recognize you when you return to our website. These cookies help us to personalize our content for you and remember your preferences.
Targeting cookies
These cookies may be deployed to our site by our advertising partners to build a profile of your interest and provide you with content that is relevant to you, including showing you relevant ads on other websites.