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)
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 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:
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"
- OPENAI_ADA_EMBEDDING_DEPLOYMENT_NAME Your "text-embedding-ada-002" model deployment name
- OPENAI_ADA_EMBEDDING_MODEL_NAME = text-embedding-ada-002
For Azure Search
- AZURE_SEARCH_ADMIN_KEY
- AZURE_SEARCH_SERVICE_ENDPOINT
- AZURE_COGNITIVE_SEARCH_SERVICE_NAME
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
-
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:
- Using GitHub Codespace and secrets ( PREFERRED, as show above)
- Provide an ".env" file (commented in many files)
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
-
Speech Summarizing with OpenAI and Azure Speech AI taken & modified from repo
-
Open AI and Azure Document Intelligence (Form Recognizer) taken & modified from repo
- Use Form Recognizer for Image to Text, and use "text-davinci" AOAI model to summarize.
-
Gradio webapp with Azure ChatGPT, your own chatGPT website taken & modified from repo
-
Azure Computer Vision and Langchain taken and modified from repo
-
Functions calling with Azure Open AI and Azure Search TODO taken & modified from repo
-
Movie recommender with Azure Open AI & Azure Search taken & modified from repo
-
Code Analysis with with Langchain + Azure OpenAI + Azure Cognitive Search (vector store) taken & modified from repo