Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
  • News
  • Artificial Intelligence
  • Applications
  • Linux
No Result
View All Result
Cloudbooklet
No Result
View All Result
Home Artificial Intelligence

How to Use GPT-4 and ChatGPT on Azure OpenAI Service

by Hollie Moore
3 months ago
in Artificial Intelligence
Chatgpt On Azure Ai
ShareTweetSendShare
Readers like you help support Cloudbooklet. When you make a purchase using links on our site, we may earn an affiliate commission.

Learn how to maximize the potential of GPT-4 and ChatGPT on Azure OpenAI Service with our comprehensive guide. Discover tips, tricks, and best practices to harness the power of this AI language model.

ADVERTISEMENT

ChatGPT and GPT-4 are huge language models from OpenAI that may be used to generate text, translate languages, write various types of creative material, and provide useful answers to your questions. They are both available on Azure OpenAI Service, making them simple to integrate into your applications. In this article, I’ll show you How to Use ChatGPT on Azure OpenAI Service step by step procedures.

Table of Contents

  1. Prerequisites
  2. What is Azure OpenAI Service?
  3. How to Access Azure OpenAI Studio?
  4. Azure OpenAI Studio Chat playground
  5. Overview of Azure OpenAI Studio Chat playground
  6. Additional Settings
  7. How to use Azure ChatGPT playground?
  8. Prompt Structure
  9. Conclusion

Prerequisites

  • An Azure subscription can be created for free.
  • Azure OpenAI has been granted access in the desired Azure subscription.
  • Currently, access to this service is only available through application. You can apply for Azure OpenAI access by filling out the form at https://aka.ms/oai/access. If you have a problem, please open an issue on this repo.
  • An Azure OpenAI Service resource running the gpt-35-turbo or gpt-41 models. See the resource deployment guide for additional information on model deployment.

What is Azure OpenAI Service?

Azure OpenAI Service provides a REST API through which you may use OpenAI’s advanced language models, including as GPT-3, Codex, Embeddings, GPT-4, and ChatGPT. These models can be applied to a wide range of tasks, including content generation, summarization, semantic search, and natural language to code translation. The service can be accessed via REST APIs, the Python SDK, or the web-based interface in Azure OpenAI Studio.

How to Access Azure OpenAI Studio?

Follow these steps to access Azure OpenAI Studio and use Chat playground.

ADVERTISEMENT
  1. Navigate to the Azure OpenAI Studio website at https://oai.azure.com/
  2. Sign in with the credentials you use to access your OpenAI resource. To log in securely, provide the essential authentication details.
  3. If prompted, pick the proper directory linked with your Azure account during the sign-in step.
  4. Then, select the Azure subscription that has access to your Azure OpenAI resource.
  5. You will be taken to the Azure OpenAI Studio homepage page after successfully signing in and selecting the proper directory and subscription.
  6. Look for the “Chat playground” option on the landing page. This option lets you experiment with and interact with language models.
  7. To access the Chat playground, click the “Chat playground” button.
Chatgpt On Azure
How to Use GPT-4 and ChatGPT on Azure OpenAI Service 1

Azure OpenAI Studio Chat playground

The Azure OpenAI Studio Chat playground is a no-code interface for experimenting with OpenAI capabilities. You may quickly iterate and experiment with different features from this page.

You might also like

Validator Ai

Validator AI: The AI Powered Business Idea Validator

1 day ago
Chatgpt To Translate

How to Use ChatGPT to Translate Your Website or Blog

1 day ago
Chatgpt On Azure
How to Use GPT-4 and ChatGPT on Azure OpenAI Service 2

Overview of Azure OpenAI Studio Chat playground

By default, the Azure OpenAI Studio Chat playground has three panels: assistant setup, chat session, and settings.

You can use Show panels to add, remove, or rearrange these panels. If you close a panel and need to get it back, use Show panels to restore the lost panel.

ADVERTISEMENT

Assistant Setup Feature

  • Locate the “Assistant setup” dropdown menu in the Chat playground interface. It enables you to choose from a library of pre-loaded System message samples to deliver instructions and context to the model.
  • Select one of the pre-loaded System message samples from the “Assistant setup” dropdown menu. These examples can assist you in defining the assistant’s personality, specifying what it should and should not answer, and instructing it on how to style responses.
  • You can also use the “Add few-shot examples” function to provide conversational examples for the model to learn from in-context. These examples assist the model in understanding the required behavior and improving its responses based on the examples presented.
  • When interacting with the Chat playground, pick “View code” to see code samples in Python, curl, and JSON. These code samples are produced automatically based on your current chat session and preferences. You can refer to these code samples when creating your own applications to accomplish the same functionality outside of the playground environment.
  • Using the Assistant setting choices, you may define the assistant’s behavior and personality, improve its replies, and fine-tune its output to meet your individual needs. The Chat playground allows you to experiment, test, and get insights for integrating OpenAI language models into your own apps.

Chat session

Sending Text: Type your preferred text into the input text box and press the “Send” button. This passes the text to the completions API, and the model responds based on the input. The model’s reaction is then displayed in the text field, allowing for a conversational back-and-forth.

Clearing Chat History: Click the “Clear chat” button to wipe the current conversation history and begin over. This action deletes all previous chat messages from the text box, leaving a blank slate for fresh conversations.

ADVERTISEMENT

Additional Settings

SettingDescriptionDefault
Deployment nameThe name of the deployment that contains the ChatGPT or GPT-4 model.None
TemperatureControls the randomness of the model’s output. Higher temperatures will produce more creative and unexpected responses, while lower temperatures will produce more factual and predictable responses.0.5
Top PControls the probability of the model selecting the top-p most likely tokens. Higher values will produce more creative and unexpected responses, while lower values will produce more factual and predictable responses.0.9
Max tokensThe maximum number of tokens that the model can generate.–
Settings

How to use Azure ChatGPT playground?

Step by step instructions to use GPT-4 and ChatGPT on Azure OpenAI Service.

Step1: Select Xbox customer care agent from the assistant setup drop-down list.

ADVERTISEMENT

Step2: When asked if you wish to update the system message, choose Continue.

Step3: In the chat session pane, type “I’m interested in buying a new Xbox” and press Send.

ADVERTISEMENT

Step4: You’ll get something like this:

Chatgpt On Azure
How to Use GPT-4 and ChatGPT on Azure OpenAI Service 3

Step5: Add a follow-up question, such as “which models support 4K?”

Chatgpt On Azure
How to Use GPT-4 and ChatGPT on Azure OpenAI Service 4

Step6: Now that you have a basic conversation, pick View code from Assistant setup to see a replay of the code behind the entire conversation thus far:

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

response = openai.ChatCompletion.create(
  engine="gpt-35-turbo", # replace this value with the deployment name you chose when           you deployed the associated model.
  messages =[
  {
    "role": "system",
    "content": "You are an Xbox customer support agent whose primary goal is to help users  with issues they are experiencing with their Xbox devices. You are friendly and concise. You only provide factual answers to queries, and do not provide answers that are not related to Xbox."
  },
  {
    "role": "user",
    "content": "How much is a PS5?"
  },
  {
    "role": "assistant",
    "content": "I apologize, but I do not have information about the prices of other gaming     devices such as the PS5. My primary focus is to assist with issues regarding Xbox devices. Is there a specific issue you are having with your Xbox device that I may be able to help with?"
  }
  ],
  temperature=0,
  max_tokens=350,
  top_p=0.95,
  frequency_penalty=0,
  presence_penalty=0,
  stop=None)

Prompt Structure

Special tokens used in ChatGPT on Azure

  • |im_start|>: This token denotes the start of the input message.
  • <|im_end|>: This token indicates the end of the input message.
  • |as_start|>: This token denotes the start of the assistant’s response.
  • <|as_end|>: This token indicates the end of the assistant’s response.

The tokens |im_start|> and |im_end|> indicate the start and end of the system message, respectively. The tokens |as_start|> and |as_end|> indicate the start and end of the assistant’s response, respectively.

ChatGPT can comprehend that the system message is a welcome message, and that the user wants to learn more about ChatGPT by using these tokens. This enables ChatGPT to provide a more natural-sounding response that is tailored to the user’s individual needs.

You may also display these tokens in the chat session window by using the Show raw syntax toggle button. This can be useful for troubleshooting or understanding how ChatGPT handles prompts.

Also read: For a more comprehensive overview DataStax refer to our guide DataStax Enhances Astra DB on Google Cloud with Vector Search Capability

Conclusion

Finally, ChatGPT on Azure OpenAI Service are excellent tools for natural language processing and conversational AI. Developers can simply integrate these models into their applications because to their user-friendly interfaces and extensive documentation. As language understanding and generating capabilities improve, these services become valuable tools for creating intelligent and engaging conversational interactions. Please feel free to share your thoughts and feedback in the comment section below.

Share4Tweet3SendShare
Hollie Moore

Hollie Moore

Greetings, I am a technical writer who specializes in conveying complex topics in simple and engaging ways. I have a degree in computer science and journalism, and I have experience writing about software, data, and design. My content includes blog posts, tutorials, and documentation pages, which I always strive to make clear, concise, and useful for the reader. I am constantly learning new things and sharing my insights with others.

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Related Posts

Fantasy Minecraft Servers

5 Best Fantasy Minecraft Servers in 2023

1 day ago
Ai Statistics And Trends

AI Statistics and Trends: What You Need to Know in 2023

1 day ago
Block Youtube Ads

How to Block YouTube Ads on Android TV in 2023 (6 Easy Methods)

1 day ago
Wix Ai

Create a Professional Website with Wix AI Website Builder

2 days ago

Follow Us

Trending Articles

Best Laptop For Minecraft-

5 Best Laptop for Minecraft in 2023: Top Picks for All Budgets

September 21, 2023

How to Become an AI Trainer: Skills, Salary, and Career Opportunities

Microsoft Surface Event: The Most Exciting and Innovative Launches and Updates

AI Annotation Jobs: Everything You Need to Know

Top 7 Free Dating Sites for Men in 2023

10 Best AI Prompts for Writers to Improve Website SEO

Popular Articles

Ai Avatar Generator

7 Best AI Avatar Generator Tools to Try Online

September 13, 2023

10 Best Free Naked AI Generator: Make Realistic Naked Photos

How to Make Money with AI: A Step-by-Step Guide

10 Best AI Mockup Generators to Create Stunning Mockups

Llama Code: How Meta AI LLM Can Help You Write Better Code

Easyerp AI: How to Create and Roleplay with AI Characters

Subscribe Now

loader

Subscribe to our mailing list to receives daily updates!

Email Address*

Name

Cloudbooklet Logo

Welcome to our technology blog, where we explore the latest advancements in the field of artificial intelligence (AI) and how they are revolutionizing cloud computing. In this blog, we dive into the powerful capabilities of cloud platforms like Google Cloud Platform (GCP), Amazon Web Services (AWS), and Microsoft Azure, and how they are accelerating the adoption and deployment of AI solutions across various industries. Join us on this exciting journey as we explore the endless possibilities of AI and cloud computing.

  • About
  • Contact
  • Disclaimer
  • Privacy Policy

Cloudbooklet © 2023 All rights reserved.

No Result
View All Result
  • News
  • Artificial Intelligence
  • Applications
  • Linux

Cloudbooklet © 2023 All rights reserved.