This is a gift the wedding of my old friend Francis and his wife Constance โค๏ธ๐ค
This code creates simple AI avatars for Francis and Constance and simulate conversations between the two of them after being given a "scenario".
![Example of conversations](https://private-user-images.githubusercontent.com/8786343/261846460-3367309b-ac87-4faf-a303-436503b46cb1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDc0MzAsIm5iZiI6MTcyNDAwNzEzMCwicGF0aCI6Ii84Nzg2MzQzLzI2MTg0NjQ2MC0zMzY3MzA5Yi1hYzg3LTRmYWYtYTMwMy00MzY1MDNiNDZjYjEucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MThUMTg1MjEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9MTFiYTVmMGUyM2ZhNDU2YWYzZTAyZWE1MTI2YTkwNzA0ODliMGFiMTE1MmUzZTYwNzA5MTM3NTJkNzNhZWQ1OCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.kpJD2HTnpnzdvcO7plblUyV16b6zvpOq9XHI1q1VpRk)
Add an environment variable OPENAI_API_KEY
with a OpenAI API key.
Simply run index.js. Press enter to get the response from each avatar.
You can change the scenario it runs (defined as a situation
and a retention
) by editing the scenarios.js
file.
![Francis moving servers](https://private-user-images.githubusercontent.com/8786343/261846500-7a1c1b7a-f5f6-4932-ad69-dd439a4766d5.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQwMDc0MzAsIm5iZiI6MTcyNDAwNzEzMCwicGF0aCI6Ii84Nzg2MzQzLzI2MTg0NjUwMC03YTFjMWI3YS1mNWY2LTQ5MzItYWQ2OS1kZDQzOWE0NzY2ZDUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDgxOCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA4MThUMTg1MjEwWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGE2N2MzMjVlMWVmYTU4MzNmNDM3NGY5ZjE1MjNmM2U0MjQyM2I1MjY3ZGJkN2YwNGIxNmU5MDc3ZTAzMzU2MiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.VDt5ehqgGUoyWhrUKbWIpYyMnNO0wliYIIGf2p9iVtI)