Skip to content

Instantly share code, notes, and snippets.

@mberman84
Created August 15, 2023 14:42
Show Gist options
  • Star 19 You must be signed in to star a gist
  • Fork 8 You must be signed in to fork a gist
  • Save mberman84/d40d3e5c0e649d26dcd3dd0163e9d8d0 to your computer and use it in GitHub Desktop.
Save mberman84/d40d3e5c0e649d26dcd3dd0163e9d8d0 to your computer and use it in GitHub Desktop.
Generative Agents Installation
# must have conda installed
git clone https://github.com/joonspk-research/generative_agents.git
cd generative_agents
# open visual studio code, open gen agents folder
# within vscode, go to reverie/backend_server
# create new file utils.py
# copy/paste contents from github (below)
###
# Copy and paste your OpenAI API Key
openai_api_key = "<Your OpenAI API>"
# Put your name
key_owner = "<Name>"
maze_assets_loc = "../../environment/frontend_server/static_dirs/assets"
env_matrix = f"{maze_assets_loc}/the_ville/matrix"
env_visuals = f"{maze_assets_loc}/the_ville/visuals"
fs_storage = "../../environment/frontend_server/storage"
fs_temp_storage = "../../environment/frontend_server/temp_storage"
collision_block_id = "32125"
# Verbose
debug = True
###
# fill out openai api key & name
conda create -n gen_agents python=3.11.4
conda activate gen_agents
# within requirements.txt file, change pillow version to 9.5.0
python -m pip install -r requirements.txt
cd environment/frontend_server
python manage.py runserver
# goto http://127.0.0.1:8000/ and verify it is working
# open new command line, leave previous command line running
# navigate to generative_agents folder
conda activate gen_agents
cd reverie/backend_server
# open reverie.py, enter this before line 400:
###
curr_move_path = f"{sim_folder}/movement"
# If the folder doesn't exist, we create it.
if not os.path.exists(curr_move_path):
os.makedirs(curr_move_path)
###
python reverie.py
# enter name of forked simulation: base_the_ville_isabella_maria_klaus
# enter name of new simulation: test-simulation
# goto: http://localhost:8000/simulator_home
# enter option: “run 3” to run 3 steps
# to replay, http://localhost:8000/replay/test-simulation/1/
@grimlik
Copy link

grimlik commented Aug 16, 2023

indent is wrong on 44-46

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment