Skip to content

Latest commit

 

History

History
144 lines (90 loc) · 5.93 KB

README-en.md

File metadata and controls

144 lines (90 loc) · 5.93 KB

OpenAI Quickstart

GitHub stars GitHub forks GitHub watchers GitHub repo size GitHub language count GitHub top language GitHub last commit GitHub last commit


English | 中文

This project is designed as a one-stop learning resource for anyone interested in large language models and their application in Generative AI(GenAI) scenarios. By providing theoretical foundations, development basics, and hands-on examples, this project offers comprehensive guidance on these cutting-edge topics.

Features

  • Theory and Development Basics of Large Language Models: Deep dive into the inner workings of large language models like BERT and GPT Family, including their architecture, training methods, applications, and more.

  • OpenAI-based Development: tutorial and best practices for OpenAI's Embedding, GPT-3.5, GPT-4, as well as practical development such as Function Calling and ChatGPT Plugin.

  • GenAI Application Development with LangChain: Hands-on examples and tutorials using LangChain to develop GenAI applications, demonstrating the practical application of large language models(AutoGPT, RAG-chatbot, Machine Translation)

  • LLM Tech Stack and Ecosystem: Data privacy and legal compliance, GPU Technology Selection Guide, Hugging Face quick start, ChatGLM usage.

Getting Started

You can start by cloning this repository to your local machine:

git clone https://github.com/DjangoPeng/openai-quickstart.git

Then navigate to the directory and follow the individual module instructions to get started.

Setting Up the Development Environment

This project is developed using Python v3.10. For a complete list of Python dependency packages, see requirements.txt.

Official documentation for key dependencies is as follows:

Below are detailed installation instructions (using Ubuntu OS as an example):

Installing Miniconda

mkdir -p ~/miniconda3
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh -O ~/miniconda3/miniconda.sh
bash ~/miniconda3/miniconda.sh -b -u -p ~/miniconda3
rm -rf ~/miniconda3/miniconda.sh

After installation, it is recommended to create a new Python virtual environment named langchain.

conda create -n langchain python=3.10

# Activate the environment
conda activate langchain 

This environment needs to be activated each time before use.

Installing Python Dependency Packages

pip install -r requirements.txt

Configuring OpenAI API Key

Depending on the command-line tool you use, set the OPENAI_API_KEY environment variable in ~/.bashrc or ~/.zshrc:

export OPENAI_API_KEY="xxxx"

Installing and Configuring Jupyter Lab

After the above development environment setup, use Miniconda to install Jupyter Lab:

# Generate a Jupyter Lab configuration file
jupyter lab --generate-config

Open the configuration file and make the following changes:

# Allowing Jupyter Lab to start as a non-root user (no need to modify if starting as root)
c.ServerApp.allow_root = True
c.ServerApp.ip = '*'

Use nohup to start Jupyter Lab in the background:

$ nohup jupyter lab --port=8000 --NotebookApp.token='replace_with_your_password' --notebook-dir=./ &

Jupyter Lab's output log will be saved in the nohup.out file (which is already filtered in the .gitignore file).

Course Schedule

For the complete documentation, please refer to the Quick Start Guide for Large Language Models (LLMs) Application Development - Course Outline

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated. If you have any suggestions or feature requests, please open an issue first to discuss what you would like to change.

Github

License

This project is licensed under the terms of the Apache-2.0 License . See the LICENSE file for details.

Contact

Django Peng - [email protected]

Project Link: https://github.com/DjangoPeng/openai-quickstart

Star History

Star History Chart