forked from AI-Yash/st-chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtodo.txt
35 lines (27 loc) · 780 Bytes
/
todo.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
3. local media
5. Disable user/bot avatar
4. improve CSS for visual elements
6. Streamline text display
1. Copy to Clipboard
2. container for ChatBox
7. wait for next message (Loader)
import streamlit_chat as stc
config = {
'bot_avatar': False | 'url' | ('bottts', 80)
}
cb = stc.ChatBox(**config)
cb.populate(user_res, bot_res, streamline=True, wait_for_msg=True, bot_first = True)
# 2 api's
# 1 : user & bot responses in arrays/lists
u: ['hi', 'i want ice cream', 'bye']
b: ['hello, how may i help you', 'ice cream is not good']
# 2 : single structured array/lists
history:
[
(stc.USER, 'content', 'text'),
(stc.BOT, 'url', 'image'),
(stc.BOT, 'content', 'html'),
]
hist = stc.History()
hist.add_bot('content', 'type')
hist.add_user('content', 'type')