This guide provides step-by-step instructions to set up the LLMHub API repository for development. Follow these steps to create and activate a Python virtual environment, install dependencies, configure environment variables, and get started with the project.
- Python 3.11+ installed on your system.
- pip (Python package installer).
- git (to clone the repository, if needed).
Clone the repo and navigate into the project directory:
git clone https://github.com/LLmHub-dev/llmhub-api.git
cd llmhub-apiCreate an isolated Python environment by running:
python -m venv .venvThis will create a new directory named venv that holds your virtual environment.
Activate the virtual environment using the appropriate command for your operating system:
-
On macOS/Linux:
source .venv/bin/activate -
On Windows:
.venv\Scripts\activate
After activation, your command prompt should show the name of the virtual environment (typically (venv)).
With the virtual environment activated, install all required dependencies using the provided requirements.txt:
pip install -r requirements.txtThe project includes an example environment file named .env.example. Rename this file to .env:
Important: After renaming, please contact the project admin to obtain the required credentials and insert them into the .env file.
Go to the run debug tab as show in the image below on the left sidebar or hit ctrl+shift+d and then click the green play button as seen in the image below to run the image below and voila you have started your API locally!
With the environment set up and dependencies installed, you’re ready to start the API. For example, if your main entry point is app.py, you can run:
python app.py- Security: Keep your
.envfile secure. Do not commit sensitive credentials to version control. - Troubleshooting: If you encounter any issues, double-check that the virtual environment is activated and that all dependencies have been installed correctly.
- Further Information: For more details, refer to the project documentation or contact your project admin.
Enjoy working with LLMHub API!
This documentation ensures that anyone cloning your repository knows exactly how to set up their environment and get the project running quickly.
