Giter VIP home page Giter VIP logo

azureopenai's Introduction

Azure Open AI using PowerShell

How to securely call Azure Open AI chat API and actively interact with the chat-gpt model using PowerShell

Pre-requisites

  • Azure PowerShell 5.7 or later installed
  • An Azure Subscription
  • An existing Azure Open AI service with chat-gpt deployment model
  • An existing Azure Key Vault with the Azure Open AI API Key added as a secret.

Add Parameter Values to the script.

Before running the 'AzureOpenAIChatCompletion.ps1' script, ensure to collect the parameter values based on pre-requisites to include:

  • Azure Key Vault Name
  • Azure Key Vault Secret for the Azure Open AI API Key
  • Azure Open AI Service Name
  • Azure Open AI deployment model name

You can also adjust the Azure Open AI parameters to fine-tune model performance. These parameters are temperature, top_p, and max tokens. The temperature parameter allows you to fine-tune model's creativity level from 0 - 2, where the higher the number the increased level of creativity. Should you desire a response more determined and logical, ensure a lower temperature is used for the model. Top_p also allows fine-tuning of model for randomness. However, ensure only one or the other are adjusted and not both at a given time.

The chat-gpt model performs using tokens. One token is equivalent to 4 char's. Should you desire to provide a prompt that is higher in length, ensure the max_token is set to a higher amount. Adjusting max_token between 300-500 will allow the model to provide complete responses without the chance of cutting off response due to limitation.

Run the script.

The script will prompt for you to connect to your Azure subscription, where a browser will prompt you for your credentials. Upon succesful authentication, you will receive a prompt to enter your message and begin interaction with the chat-gpt model. After the model's response, you will be prompted if you wish to continue conversation. Responding 'yes' will allow continuous interaction and response, while responding 'no' will result in exiting the chat-gpt conversation.

azureopenai's People

Contributors

xavi0ne avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.