Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dair-ai/maven-pe-for-llms-7
Code, Demos, and Exercises for Prompt Engineering for LLMs Course
https://github.com/dair-ai/maven-pe-for-llms-7
Last synced: 3 months ago
JSON representation
Code, Demos, and Exercises for Prompt Engineering for LLMs Course
- Host: GitHub
- URL: https://github.com/dair-ai/maven-pe-for-llms-7
- Owner: dair-ai
- Created: 2024-01-17T21:14:12.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-25T17:12:06.000Z (about 1 year ago)
- Last Synced: 2024-05-22T16:22:43.822Z (9 months ago)
- Language: Jupyter Notebook
- Size: 772 KB
- Stars: 6
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prompt Engineering for LLMs - Notebooks and Exercises
Welcome to the notebooks and exercises for the Prompt Engineering for LLMs course.
## 1. Sign up for an OpenAI Key
To run the notebooks in this repo, you are required to sign up for an OpenAI paid account.
Sign up a paid account here: https://platform.openai.com/. Once done, you can generate an API key.
## 2. Check out the repo
```sh
git clone https://github.com/dair-ai/maven-pe-for-llms-7.git
cd maven-pe-for-llms-7
```If you already have the repo, go into it and make sure you have the latest.
```sh
cd maven-pe-for-llms-7
git pull origin master
```If you have downloaded the zipped file instead, unzip it and go into the directory.
```sh
cd maven-pe-for-llms-7
```## 3. Setup the environment
### Conda
If you don't have conda, you can install it [here](https://docs.conda.io/projects/conda/en/latest/user-guide/install/).
Once installed, run the following command to create a new environment called `pe-for-llms`.
```sh
conda create -n pe-for-llms
```Next, activate the conda environment.
```sh
conda activate pe-for-llms
```### Python environment
If you don't want to use conda, you can create a virtual environment using Python's `venv` module.
```sh
python3 -m venv .venv
```Next, activate your environment (the command below is for Linux)
```sh
source .venv/bin/activate
```## 4. Install the packages
Next, install the dependencies inside the requirements.txt file.
```sh
pip install -r requirements.txt
```## 5. Run the Preparation Exercise
Run the prepare exercise notebook (found inside the [exercises folder](https://github.com/dair-ai/maven-pe-for-llms-7/blob/main/exercises/PE_for_LLMs_Preparation_Exercise.ipynb)). Before attempting the preparation exercise, add a `.env` file to your root folder and add your `OPENAI_API_KEY`.
That's it! You're all setup to start working on the notebooks and exercises.