Implementing and Integrating ChatGPT using Microsoft Azure Open AI

What is ChatGPT?

  • ChatGPT is a conversational artificial intelligence chatbot that allows you to have human like conversations more than chatbots.
  • ChatGPT is an artificial intelligence chatbot which is developed by Open AI company.
  • ChatGPT is built on the top of Open AI's families GPT – 3.5 and GPT 4 of advanced large language models.
  • Azure Open AI is one of the cognitive services of the Microsoft Azure AI platform.

Create, implement, and integrate ChatGPT in Microsoft Azure

  • Log in to the Azure portal (https://portal.azure.com/)
  • Search Azure Open AI service in the search bar.
  • First, provide an Azure subscription.
  • Create a new resource group.
  • Choose the Azure region and provide a Name
  • And then choose the pricing tier.
  • Finally, click the Review + Create button.
  • You will get a popup message stating that Validation passed.
  • Then you click create button.
  • The deployment started initialized in a minute or two it will become successful.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Once deployment succeeds, you will get the message "Your deployment is complete".

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Click the Go to Resource button.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Click Explore button.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Click Create new deployment button.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

First, select a model name and click gpt 35 turbo.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Type model version and deployment name.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Click Create button.

You can see the status is succeeded.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Now you will be able to see the ChatGPT Preview appears on the screen.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

If you click Assistant setup, it will display different types of Knowledge bases.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

System messages describe the user persona what it should and shouldn't answers and also explains the format of the detailed responses.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

In the Chat session, the user can view the code in Python, C#, JSON, and Curl.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Code Snippet

#Note: The openai-python library support for Azure OpenAI is in preview.
import os
import openai
openai.api_type = "azure"
openai.api_base = "https://retailai.openai.azure.com/"
openai.api_version = "2023-03-15-preview"
openai.api_key = os.getenv("OPENAI_API_KEY")

response = openai.ChatCompletion.create(
  engine="retailchatgpt",
  messages = [],
  temperature=0.7,
  max_tokens=800,
  top_p=0.95,
  frequency_penalty=0,
  presence_penalty=0,
  stop=None)

print(response)

Clear chat - This will permanently delete the current chat history. To save this chat, copy the content to a separate document before clearing.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

In the user message, the users can prompt the input.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

You can see the detailed responses below and enjoy the recipe for Rasmalai.

Implementing and Integrating ChatGPT using Microsoft Azure Open AI

Summary

In this article, we created, implemented, and integrated ChatGPT with Microsoft Azure Open AI Studio. As of now, ChatGPT is available in the Preview mode.

Coming soon, ChatGPT becomes generally available and also helps our customers apply the world's most advanced artificial intelligence models to their business imperatives.

I hope you have enjoyed reading this article!!!


Similar Articles