Spaces:
Sleeping
Sleeping
Download src/agents/userproxyagent.py from genaitiwari/AutogenMultiAgent: direct link, hf CLI and curl.
- Browser
- Download file 431 Bytes
-
https://huggingface.co/spaces/genaitiwari/AutogenMultiAgent/resolve/main/src/agents/userproxyagent.py
- Command line
-
hf download hf://spaces/genaitiwari/AutogenMultiAgent/src/agents/userproxyagent.py
-
curl -L -o userproxyagent.py https://huggingface.co/spaces/genaitiwari/AutogenMultiAgent/resolve/main/src/agents/userproxyagent.py
431 Bytes
| from autogen import UserProxyAgent | |
| import streamlit as st | |
| class TrackableUserProxyAgent(UserProxyAgent): | |
| def _process_received_message(self, message, sender, silent): | |
| with st.chat_message(sender.name.lower()): | |
| if type(message)==str: | |
| st.write(message) | |
| else : | |
| st.write(message['content']) | |
| return super()._process_received_message(message, sender, silent) | |