Detective Game is an interactive text-based game where you play the role of a detective. This sample is meant to show off Llama 3 from Meta running locally. The AI bot that is running on Llama 3 via Ollama assumes a random role related to a crime scenario. Your goal is to determine whether the AI bot is innocent or guilty through a series of questions.
- Llama 3: Open source Large Language Model from Meta for generating AI responses.
- Ollama: Platform for running Llama 3 locally.
- Rich: Library for creating beautiful terminal outputs.
-
Llama 3 model files: Required to generate AI responses (download from Ollama).
-
Python Libraries:
python-dotenv
: For environment variable management.rich
: For terminal UI.langchain_community
: For Llama 3 integration.
These can be installed by running:
pip install -r requirements.txt
Download: https://ollama.com/download
Tutorial: https://www.youtube.com/watch?v=Asleok-Snfs
-
Initialize Llama 3:
- Run the command
ollama run llama3
to initialize and run the Llama 3 model locally using the Ollama platform. This is required for generating AI responses.
- Run the command
-
Install Dependencies:
- Install the required Python packages by running:
pip install -r requirements.txt
- Install the required Python packages by running:
-
Start the Game:
- Run the following command to start the game:
python startGame.py
- Run the following command to start the game:
-
Initialize Llama 3:
- Just like with the source code method, you need to run the Llama 3 model:
ollama run llama3
- Just like with the source code method, you need to run the Llama 3 model:
-
Run the Game:
- Navigate to the
dist
folder where the executable is located. - Double-click on
startGame.exe
to launch the game.
Alternatively, you can run the executable via the command line:
./dist/startGame.exe
- Navigate to the