Giter Site home page Giter Site logo

jessekorzan / react-gpt-35-azure-openai-with-express Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 66 KB

Excellent starter template for chat apps. Very simple implementation using React, Express, npm Azure-OpenAI.

Home Page: https://replit.com/@JesseKorzan/React-GPT-35-Azure-OpenAI-with-Express

JavaScript 50.92% HTML 4.69% Nix 1.67% CSS 42.73%
boilerplate chatgpt expressjs javascript openai quickstart reactjs template

react-gpt-35-azure-openai-with-express's Introduction

React GPT-3.5 boilerplate w/Azure and express.js

Simple, straightforward boilerplate to get started with a chat-like bot using OpenAI on Azure. The front-end uses easily understood CSS within a React wrapper that is under 100 lines of javascript. In short, this template requires only a rudimentry understanding of React and CSS from which to demo, test, build and ideate with ChatGPT.

Highlights include:

  • fast start with ChatGPT chatbot
  • complete React web app
  • responsive CSS
  • built by a dumb guy ... anyone can use it!

Usage

Refer to the section below, Getting Started, for more about running React on Replit. Only re-prerequisite is you will need your own openAI key and create a new "secret" (env variable) in your Repl.

Login into Azure to configurd your Azure OpenAI's key, endpoint and deploymentId. How to use Secrets in Repl to configure your environment variable. You'll need two secrets, "endpoint" and "openAI", to work with the script located in /api/server.js

All good? You're ready to "run"!

Frameworks and Packages

Azure Openai

NPM Azure-Openai is fork of the official OpenAI Node.js library that has been adapted to support the Azure OpenAI API.

express.js

Express.js Help docs if you need more information. Not a requirement to run this template.

Running React on Repl.it

React is a popular JavaScript library for building user interfaces.

Vite is a blazing fast frontend build tool that includes features like Hot Module Reloading (HMR), optimized builds, and TypeScript support out of the box.

Using the two in conjunction is one of the fastest ways to build a web app.

Getting Started

  • Hit run
  • Edit App.jsx and watch it live update!

By default, Replit runs the dev script, but you can configure it by changing the run field in the configuration file. Here are the vite docs for serving production websites

License

MIT License MIT License

Copyright (c) [2023] [jesse korzan]

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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.