File size: 544 Bytes
9f396ec
 
6617b51
 
9f396ec
 
 
 
6617b51
 
 
 
 
 
 
9f396ec
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from autogen import UserProxyAgent
import streamlit as st
import base64
from io import BytesIO


class TrackableUserProxyAgent(UserProxyAgent):
    def _process_received_message(self, message, sender, silent):
        
        if type(message)==str and sender.name == 'Image_Assistant':
            with st.chat_message('ai'):
                st.image('./imagegen/response.jpeg')

        else :
            with st.chat_message('ai'):
                st.write(message)
        return super()._process_received_message(message, sender, silent)