GithubHelp home page GithubHelp logo

ganjakha / chat Goto Github PK

View Code? Open in Web Editor NEW

This project forked from alexsky177/chat

0.0 0.0 0.0 2.26 MB

Javascript ChatGPT clone. JavaScript only - no need php, python ... etc. Easily installed on any web server and localhost. Only 1 file to setup. You can see the demo site below. Demo site exceeded current quota, need change API_KEY.

Home Page: https://autofm.ru/

License: GNU General Public License v3.0

JavaScript 43.53% CSS 41.31% HTML 15.16%

chat's Introduction

ChatGPT - JavaScript clone

Version ChatGPT 3.5 turbo, 3.5 turbo 0301.
Version GPT 4 has not been tested yet.

chatgpt

➥ Download ZIP or use git command.

➥ Get your OpenAi key - https://platform.openai.com/account/api-keys

➥ Open config.js and fill const strIndex = "YOUR_API_KEY";

➥ If you want to change path - const path = "/chat"; - change it. For root use const path = "";

➥ If you want to change system_message - const system_message = "You are a smart robot!"; - change it. By changing this setting, you can adapt this application to your needs.

➥ Make path /chat or any other on your web server.

➥ Upload files to this directory.

➥ Type in the browser your address https://your-website.com/chat/ and enjoy.

➥ Also you can use Obfuscator to hide your api key for security reason.
https://codebeautify.org/javascript-obfuscator

Used frontpage html, js and css from this project (with some mods)
https://github.com/xtekky/chatgpt-clone

Used Javascript Openai api request
https://www.builder.io/blog/stream-ai-javascript

All functions are preserved, except for the web search - instead, a change in theme from dark to light has been made. Added temperature change function. Added context. So GPT remember your last questions.

Run on localhost

This program runs on a laptop or desktop computer locally from a folder.

How to install localhost

Read this stackoverflow solution
https://stackoverflow.com/questions/38497334/how-to-run-html-file-on-localhost

You can use Node.js or Python server.

How to install app on Pyton:

  1. Install Pyton - https://www.python.org
  2. Сreate a directory chat.
  3. Change const path in config.js to path = "";.
  4. Change const root in config.js to root = "."; ( just delete //).
  5. Put index.html and assets files here.
On the Windows command line or in the Mac terminal, type
cd chat
then
python -m http.server
  • Open in browser http://192.168.1.52:8000/
  • Also you can use http://127.0.0.1:8000/
  • Or this address http:/localhost:8000/

Use app on your local computer.

chatgpt

Last update - added convertations.
Removed all php files.
Changed path for assets files.

chat's People

Contributors

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