Skip to content

christabelle/OpenAI-Playground

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenAI-Playground

Deploy the Azure resources

Depending on the demo used, you will need to deploy some of the following Azure Resources :

  • Azure OpenAI service
  • Azure Speech
  • Azure Computer Vision
  • Azure Search
  • Azure Document Intelligence (old Form Recognizer)

Prepared to run in GitHub Codespace (also local devcontainer)

The repository has been prepared to execute as a devcontainer (using GitHub Codespaces). This container includes all the tools needed (mainly Python/Jupyter) and python libraries. You can check the deployed configuration in:

Add GitHub Codespace secrets

Add the following secrets related to the deployed Azure resources to the GitHub Repository (Codespaces), as they are going to be used in the Demos (some demos may require more settings). Go to Settings>Secrets and Variables>Codespaces:

Alt text

For Azure OpenAI

  • AZURE_OPENAI_API_KEY
  • AZURE_OPENAI_ENDPOINT
  • AZURE_OPENAI_MODEL_CHAT: In my case I used a deployment of "gpt-35-turbo"
  • AZURE_OPENAI_MODEL_CHAT_VERSION : in my case I used "2023-03-15-preview"

For Azure Search

  • AZURE_SEARCH_ADMIN_KEY
  • AZURE_SEARCH_SERVICE_ENDPOINT

For Azure Computer Vision

  • AZURE_COMPUTER_VISION_ENDPOINT
  • AZURE_COMPUTER_VISION_KEY

For Azure Document Intelligence (Form Recognizer)

  • AZURE_DOC_ENDPOINT
  • AZURE_DOC_KEY

For Azure Speech

  • AZURE_SPEECH_KEY
  • AZURE_SPEECH_REGION

Demos

  • The GitHub codespace automatically installs all needed modules when launched, but you can also find them in the requirements.txt file.

    WARNING: you can also execute "pip3 install --user -r requirements.txt" if the libraries are missing for some reason.

  • For the jupiter Notebooks, open the file and select kernel before running (python 3.11 is provided). Configuration can be given in two ways:

    1. Using GitHub Codespace and secrets ( PREFERRED, as show above)
    2. Provide an ".env" file (commented in many files)

Basics

The following demos are provided under the DeepLearningAI-Course folder. Demos are taken from the course provided at https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/1/introduction . All Demos use ChatCompletion Endpoint.

  • Getting Started
  • Iterative Prompts
    • Create Description from Product Fact Sheet (limit words, focus on aspects, add dimension, render into an HTML page)
  • Summarizing
    • Summarize various product reviews in a single prompt
  • Inferring
    • Analyze text sentiment, emotions, identify anger (product review), extract product information, ...
  • Transforming
    • Translate single and multiple languages, using different tones
    • Format conversion (JSON to HTML)
    • Grammar checks
  • Expanding
    • Automate email reply to customers reviews
  • ChatBot
    • Provide multiple messages (with roles), to the "ChatCompletion" call.
    • Pizza ordering Bot sample

Intermediate

Advanced

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Jupyter Notebook 100.0%