add AI avatar

This commit is contained in:
if 2023-03-19 19:53:27 +03:00
parent 2dac1cc742
commit d5ed319b4c
2 changed files with 1 additions and 10 deletions

View File

@ -39,15 +39,6 @@ repos:
hooks: hooks:
- id: validate-pyproject - id: validate-pyproject
- repo: https://github.com/pre-commit/mirrors-pylint
rev: a1b176a5ee919967cf01e87c0222bd64b94fe0de
hooks:
- id: pylint
args:
- --max-line-length=120
- --ignore-imports=yes
- -d duplicate-code
- repo: https://github.com/pre-commit/pygrep-hooks - repo: https://github.com/pre-commit/pygrep-hooks
rev: v1.9.0 rev: v1.9.0
hooks: hooks:

View File

@ -21,6 +21,6 @@ def show_conversation(ai_content: str, user_text: str) -> None:
st.session_state.generated.append(ai_content) st.session_state.generated.append(ai_content)
if st.session_state["generated"]: if st.session_state["generated"]:
for i in range(len(st.session_state["generated"]) - 1, -1, -1): for i in range(len(st.session_state["generated"]) - 1, -1, -1):
message("", key=str(i))
st.markdown(st.session_state["generated"][i]) st.markdown(st.session_state["generated"][i])
# message(st.session_state["generated"][i], key=str(i))
message(st.session_state["past"][i], is_user=True, key=str(i) + "_user", avatar_style="micah") message(st.session_state["past"][i], is_user=True, key=str(i) + "_user", avatar_style="micah")