Skip to content

Latest commit

 

History

History
49 lines (36 loc) · 2.37 KB

README.md

File metadata and controls

49 lines (36 loc) · 2.37 KB

SocialStream

Python 3.11 pre-commit Ruff Checked with mypy

Get started

This package supports Python 3.11 and above. We recommend using a virtual environment to install this package, e.g.,

conda create -n socialstream python=3.11; conda activate socialstream;  curl -sSL https://install.python-poetry.org | python3
poetry install

Usage

streamlit run app.py Before that you should specify a Redis database by conda env config vars set REDIS_OM_URL={YOUR_URL}

Chat

First choose the agents (two agents cannot be the same), scenarios and the agent you are going to be, then click start to start interaction. When you want to leave and get evaluated, click stop to start evaluation.

Contribution

Install dev options

mypy --install-types --non-interactive socialstream
pip install pre-commit
pre-commit install

New branch for each feature

git checkout -b feature/feature-name and PR to main branch.

Before committing

Run pre-commit run --all-files to run all checks

Check github action result

Check the github action result to make sure all tests pass. If not, fix the errors and push again.

About Callbacks in Streamlit

From Streamlit documentation on session state.

"When updating Session state in response to events, a callback function gets executed first, and then the app is executed from top to bottom."

In this code, we utilize callbacks to handle the clickability of buttons and ensure that any edited information is promptly and accurately updated.