GithubHelp home page GithubHelp logo

chatgpt_api_web's Introduction

chatgpt_API_web

Use ChatGPT API on the web

Build my own web version of ChatGPT using its API, together with the latest (as of 03 March 2023) gpt-3.5-turbo model, on a Mac. Special thanks to OpsConfig, his demo code provides a foundation of this repository.

Special?

Not special, but it can fulfill the basic function. It remembers the previous conversation, it also shows the full conversation on the same page.

Requirement

  • Installation of openai and gradio
  • Mac (to use the Script Editor to build a launcher which actually opens the chat interface in a browser tab, here I used Safari)
  • ChatGPT API key

Note

  • The file ChatGPT_API.app in this repository was created by Script Editor on mac, so you can use Script Editor to open and edit.
  • ui.py contains the Python code you need to execute your chat commands.
  • If the browser tab shows nothing, refresh the page.

Steps

  • Download the 2 files and edit them (API key and Org ID in the .py file, path-to-python-code and URL in the .app script)
  • Double-click the ChatGPT_API.app to start your own UI.

Update history

  • Added a Tokens Used textbox on the right, to show the tokens consumed for this chat. demo of updated ui

Demo ui

demo ui

demo ui 2

chatgpt_api_web's People

Contributors

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