GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - GeeksHacking/GenAI-workshop: We ran a workshop where we developed GenAI applications in Python using a very popular framework called LangChain. Kudos to @chukmunnlee for his time in conducting this workshop!

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

6 Commits
6 Commits

Folders and files

NameName
Last commit message
Last commit date
.devcontainer
.devcontainer
 
 
0_test_setup
0_test_setup
 
 
1_prompts_and_llms
1_prompts_and_llms
 
 
2_vector_store
2_vector_store
 
 
3_tools
3_tools
 
 
4_capstone
4_capstone
 
 
ebooks
ebooks
 
 
images
images
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

GeeksHacking GenAI Workshop

IMPORTANT Please complete the setup before you attend the workshop.

[0] Pre-requisite

  • Notebook, not table, with a minimum of 4 CPUs and 8 GB of memory
  • Python 3.11 installed on your notebook and a Python package manager like Conda or virtual environment.
  • An IDE or code editor of your choice with Python syntax highlighting and LSP support. The workshop will be conducted using Visual Studio Code (VSC). If you are using Visual Studio Code install the following extension
    • VSC extension - Microsoft Python
  • You should also have Git installed
  • ALTERNATIVE - If you are familiar with DevContainers and would like to use it for this workshop, please install the following:
    • Docker
    • VSC extension - Remote Explorer
    • VSC extension - DevContainers

[1] Create OpenAI Platform Account

[1.1] Add Credit

Create an OpenAI account. After your account has been created, you will now need to add USD$5 your account. Click on the gear icon on the top menu bar. This will bring you to the Settings page. From the left menu bar, click on Billing. The Billing page is shown below.

OpenAI Platform Billing

Click on Add to credit balance which brings up the Add to credit balance dialog box. Add your payment method and enter a minimum of USD$5. Once you have confirmed the payment, the billing page will display the amount you have entered.

[1.2] Generate an OpenAI Secret Key

Click on Dashboard on the top menu bar. Click on API keys to create a new secret key as shown below.

OpenAI Create secret key

After you have generated your key, keep a copy of the key. You will not be able to view the key again once you dismissed the dialog.

[2] Setup the Workshop's Environment

This is a template repository. Clone it to create your own repository based on this template.

You will now need to select ONE of the following methods for running the workshop; either directly on your notebook or in a container.

If you are running the workshop locally, then perform step [2.1] Notebook Setup; otherwise setup according to [2.3] DevContainer Setup. The advantage of running in a container is that there are no Python installation on your notebook.

[2.1] Notebook Setup

Open a terminal and to create and activate your environment, eg. for Conda,

conda create geekshacking-workshop
conda activate geekshacking-workshop 

Once the environment has been activated, install the packages from the requirements.txt file eg.

pip install -r requirements.txt

Depending on your notebook and your network throughput, this can be anywhere from 5 to 20 minutes.

After you have successfully installed all the packages, test your environment. Open a terminal, if you have not done so. For Windows user, use the cmd rather than PowerShell.

[2.2] Test OpenAI Secret Key

Set the environment variable OPENAI_API_KEY to your OpenAI key that you have generated in step [1.2].

For Windows (case sensitive)

set OPENAI_API_KEY=_secret_key_

For Linux and OSX (case sensitive)

export OPENAI_API_KEY='_secret_key_'

After setting the keys, change directory into 0_test_setup directory and run main.py.

## Linux and OSX
export OPENAI_API_KEY='_secret_key_'
## Windows
set OPENAI_API_KEY=_secret_key_

cd 0_test_setup
python main.py

If you see the following output, the you have successfully setup your environment.

Test run

[2.3] ALTERNATIVE - Setup DevContainer

If you are using DevContainer, then open this repository in VSC after install all the required pre-requisites from step [0]. VSC will setup the Python environment and installed all the required packages. This can take about 5 to 20 minutes.

DevContainer installation

Open a terminal from within VSC, choose cmd for Windows, and perform the OpenAI test as described in step [2.2] above.

DevContainer test

About

We ran a workshop where we developed GenAI applications in Python using a very popular framework called LangChain. Kudos to @chukmunnlee for his time in conducting this workshop!

Resources

Readme
Activity
Custom properties

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.