Hiding thoughts entirely with Streamlitcallbackhandler

With the Streamlitcallbackhandler, I cannot get it to honor the max_thought_containers value. I’m mainly looking for a way that doesn’t involve CSS hiding to suppress all thoughts from the UI. I can’t imagine ever wanting thought attribution for my use cases and users, so its odd there doesn’t seem to be a way.

I’ve tried to set max_thought_containers = 0, -1, 1, and so on… every time I get multiple thought bubbles, and while using agents, there is all sorts of ‘inner monologue’ it is putting on screen that should never be shown to a user.

This is coming from langchain agents, and I just want it to post the final answer and put nothing else on screen.

running locally streamlit v1.29, python 3.11

:rotating_light: Before clicking “Create Topic”, please make sure your post includes the following information (otherwise, the post will be locked). :rotating_light:

  1. Are you running your app locally or is it deployed?
  2. If your app is deployed:
    a. Is it deployed on Community Cloud or another hosting platform?
    b. Share the link to the public deployed app.
  3. Share the link to your app’s public GitHub repository (including a requirements file).
  4. Share the full text of the error message (not a screenshot).
  5. Share the Streamlit and Python versions.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.