DEV Community

Cover image for A Practical Guide for Beginners: Azure OpenAI with JavaScript and TypeScript (Part 01)
Glaucia Lemos for Microsoft Azure

Posted on • Updated on • Originally published at dev.to

A Practical Guide for Beginners: Azure OpenAI with JavaScript and TypeScript (Part 01)

Introduction

A Practical Guide for Beginners: Azure OpenAI with JavaScript and TypeScript is an essential starting point for exploring Artificial Intelligence in the Azure cloud. This guide will be divided into 3 parts, covering: 'How to create the Azure OpenAI Service resource,' How to implement the model created in Azure OpenAI Studio, and finally, how to consume this resource in a Node.js/TypeScript application. This series will help you learn the fundamentals so that you can start developing your applications with Azure OpenAI Service. Whether you are a beginner or an experienced developer, discover how to create intelligent applications and unlock the potential of AI with ease.

Topics covered in this series:

Responsible AI

Before we start discussing Azure OpenAI Service, it's crucial to talk about Microsoft's strong commitment to the entire field of Artificial Intelligence. Microsoft is deeply dedicated to this topic. Therefore, Microsoft is committed to ensuring that AI is used in a responsible and ethical manner. Furthermore, Microsoft is working with the AI community to develop and share best practices and tools to help ensure that AI is used in a responsible and ethical way, thereby incorporating the six core principles, which are:

  • Fairness
  • Inclusivity
  • Reliability and Safety
  • Transparency
  • Security and Privacy
  • Accountability

If you want to learn more about Microsoft's commitment to Responsible AI, you can access the link Microsoft AI Principles.

Now, we can proceed with the article!

Understanding Azure OpenAI Service

Azure OpenAI Service provides access to advanced OpenAI language models such as GPT-4, GPT-3.5-Turbo, and Embeddings via a REST API. The GPT-4 and GPT-3.5-Turbo models are now available for general use, allowing adaptation for tasks such as content generation, summarization, semantic search, and natural language translation to code. Users can access the service through REST APIs, Python SDK, or Azure OpenAI Studio.

To learn more about the models available in Azure OpenAI Service, you can access them through the link Azure OpenAI Service models.

Creating the Azure OpenAI Service Resource

The use of Azure OpenAI Service is limited. Therefore, it is necessary to request access to the service at Azure OpenAI Service. Once you have approval, you can start using and testing the service!

Once your access is approved, go to the Azure Portal and let's create the Azure OpenAI resource. To do this, follow the steps below:

  • Step 01: Click on the Create a resource button.

azure-openai-01.png

  • Step 02: In the search box, type Azure OpenAI and then click Create.

azure-openai-02.png

azure-openai-03.png

  • Step 03: On the resource creation screen, fill in the fields as follows:

azure-openai-04.png

Note that in the Pricing tier field, you can test Azure OpenAI Service for free but with some limitations. To access all features, you should choose a paid plan. For more pricing information, access the link Azure OpenAI Service pricing.

  • Step 04: Under the Network tab, choose the option: All networks, including the internet, can access this resource. and then click Next.

  • Step 05: After completing all the steps, click the Create button to create the resource.

azure-openai-05.png

  • Step 06: Wait a few minutes for the resource to be created.

azure-openai-06.png

Next steps

In the next article, we will learn how to deploy a model on the Azure OpenAI Service. This model will allow us to consume the Azure OpenAI Service directly in our code.

Oh, I almost forgot to mention! Don't forget to subscribe to my YouTube Channel! In 2023, there will be many exciting new things on the channel!

Some of the upcoming content includes:

  • 😃 Microsoft Learn Live Sessions
  • 😃 Weekly Tutorials on Node.js, TypeScript, & JavaScript
  • 😃 And much more!

If you enjoy this kind of content, be sure to subscribe and hit the notification bell to be notified when new videos are released. We already have an amazing new series coming up on the YouTube channel this week.

Screen-Shot-12-31-20-at-01-06-AM.png

To stay updated on other exciting news, be sure to follow me on Twitter!

Screen-Shot-12-31-20-at-01-06-AM.png

See you in the next article! ❤️❤️

Top comments (2)

Collapse
 
dfberry profile image
Dina Berry

What a wonderful series. Thank you.

Collapse
 
glaucia86 profile image
Glaucia Lemos

Thank you, Dina. Much more to come! 🙃