gradio icon indicating copy to clipboard operation
gradio copied to clipboard

Display intermediate work (e.g. LLM agent thought process) inside Chatbot messages

Open taoari opened this issue 1 year ago • 4 comments

  • [x] I have searched to see if a similar issue already exists.

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Agent becomes a popular topic for LLM. An agent usually has a thought process and does some intermediate work. It would be great if gr.Chatbot could adopt to display those processes.

E.g. OpenAI code interpreter "Show work"

Screenshot 2023-08-25 at 11 08 44 AM

E.g. LangChain Agent "Thought process"

https://python.langchain.com/docs/integrations/callbacks/streamlit

Screenshot 2023-08-25 at 11 04 45 AM

Describe the solution you'd like
A clear and concise description of what you want to happen.

Something similar to OpenAI code interpreter "Show work" or LangChain Agent "Thought process" (streamlit) is supported by gr.Chatbot.

Additional context
Add any other context or screenshots about the feature request here.

taoari avatar Aug 25 '23 18:08 taoari

Thanks for creating these issues @taoari

cc @dawoodkhan82 -- I don't think we add this to the component cleanup sprint, but I went ahead and added to the tracking issue: https://github.com/gradio-app/gradio/issues/4800

abidlabs avatar Aug 25 '23 18:08 abidlabs

Hello ! Any news on this feature ? With the rise of agents, it would be incredible <3

TheoLvs avatar May 20 '24 00:05 TheoLvs

Hi @TheoLvs - I have a prototype working as a custom component. Will coordinate with the team on how to upstream to core.

freddyaboulton avatar May 20 '24 15:05 freddyaboulton

Hi @taoari @TheoLvs . I released a custom component called AgentChatbot that displays intermediate thoughts/messages.

Would love your feedback on this while we discuss how to upstream this to core Gradio.

Docs and Demo here: https://huggingface.co/spaces/freddyaboulton/gradio_agentchatbot

freddyaboulton avatar May 20 '24 23:05 freddyaboulton