This project has all the code discussed in the 100x LLM lectures
- Python 3.8+
- pip
- Install
virtualenv
if not already installed:
pip install virtualenv
- Create a new virtual environment:
virtualenv venv
source venv/bin/activate
- Clone the repository:
git clone <repository-url>
- Navigate to the project directory:
cd <project-directory>
- Install required packages:
pip install -r requirements.txt
- Set up environment variables:
- Copy
.env_example
to.env
. - Add necessary API keys and configuration settings to
.env
.
- Copy
- OpenAI Chat Completions: Utilizes OpenAI's GPT models for generating chat completions.
- Groq Chat Completions: Uses Groq's API for chat completions.
- Hugging Face Chat Completions: Demonstrates chat completions using Hugging Face models.
- Weather Information: Fetches current weather using OpenAI and Groq APIs.
- Stock Prices: Retrieves current stock prices using OpenAI's API.
- Utilizes Hugging Face's Inference API to classify images provided via URLs.
- Custom API built with FastAPI to perform operations like adding numbers and querying data.
chat_completions/
: Contains scripts for chat completions using different APIs.function_calling/
: Scripts for calling functions like fetching weather and stock prices.huggingface/
: Examples of using Hugging Face's Inference API for tasks like image classification.api/
: Contains FastAPI applications for custom functionalities.data/
: Sample data files used in the project.
- Ensure that all environment variables are correctly set in the
.env
file before running the scripts. - Refer to the respective API documentation for detailed usage and limitations: