Git Product home page Git Product logo

unitygirl / azure-chatgpt-demo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hddevteam/azure-chatgpt-demo

0.0 0.0 0.0 1.07 MB

A fascinating demo website built with Node.js and Azure OpenAI gpt-35-turbo (version 0301)/gpt4 model. This project serves as a great starting point for developers who are interested in developing chatbot applications using JavaScript and Azure OpenAI API.

License: MIT License

JavaScript 75.55% CSS 15.59% HTML 8.86%

azure-chatgpt-demo's Introduction

chatGPTdemo for Azure OpenAI gpt-35-turbo (version 0301)/gpt4 model ๐Ÿค–

Welcome to chatGPTdemo, a fascinating demo website built with Node.js and Azure OpenAI gpt-35-turbo (version 0301)/gpt4 model. This project serves as a great starting point for developers who are interested in developing chatbot applications using JavaScript and Azure OpenAI API.

๐ŸŒŸ Features

chatGPTdemo

  • Easy-to-use chat interface
  • Customizable AI character role
  • Mobile and tablet compatibility
  • Support for Azure Text-to-Speech engine
  • Auto-play bot message audio option
  • User profile switch feature
  • Display actor avatar and name in header when selected
  • Support for loading system prompt from remote URL
  • System message customization using /system xxx command
  • Message formatting preservation
  • Token counter
  • Support for adding and removing messages in current round conversation ๐Ÿ’ฌ

๐Ÿš€ Getting Started

Prerequisites

  • Node.js installed on your local machine
  • An API key and endpoint from Azure OpenAI portal

Installation

  1. Clone the project to your local machine

  2. Create a .env file in the root folder of the project

  3. Add your API key and endpoint to the .env file using the following format:

    API_KEY=yourapikey
    API_URL=https://$yourendpoint/openai/deployments/$gptmodelname$/chat/completions?api-version=2023-03-15-preview
    
  4. (Optional) Add extra features with PROMPT_REPO_URLS and AZURE_TTS:

    • PROMPT_REPO_URLS is a JSON object containing the user name and the URL of the prompt file:

      PROMPT_REPO_URLS={"user1":"user1prompts.json", "user2":"user2prompts.json","user3":"user3prompts.json"}
      

      For the user1prompts.json content format, check the example file at ./public/prompts.json.

    • AZURE_TTS is a JSON object containing the subscription key and the endpoint of the Azure Text-to-Speech service:

      AZURE_TTS={"subscriptionKey":"your subscription key","endpoint":"your endpoint"}
      
  5. Install the necessary packages:

    npm install
    
  6. Start the server:

    node server.js
    
  7. Open your browser and visit http://localhost:3000 to enjoy the chatGPTdemo website!

chatGPTdemo

Now you're all set to explore and develop your chatbot application using JavaScript and Azure OpenAI API. Happy coding! ๐ŸŽ‰

azure-chatgpt-demo's People

Contributors

hddevteam 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.