GithubHelp home page GithubHelp logo

blrchen / chatgpt-lite Goto Github PK

View Code? Open in Web Editor NEW
183.0 6.0 82.0 1.32 MB

Fast ChatGPT UI with support for both OpenAI and Azure OpenAI. 快速的ChatGPT UI,支持OpenAI和Azure OpenAI。

Home Page: https://gptlite.vercel.app

License: MIT License

Dockerfile 2.43% JavaScript 0.82% TypeScript 91.90% CSS 0.10% SCSS 4.76%
chatgpt gpt-3 openai prompt-engineering gpt gpt3 gpt-35-turbo openai-api prompt-tuning chatgpt-app

chatgpt-lite's Introduction

ChatGPT Lite

English | 简体中文

Demo

Visit the ChatGPT Lite Demo Site

Features

ChatGPT Lite is a lightweight ChatGPT web interface developed using Next.js and the OpenAI Chat API. It's compatible with both OpenAI and Azure OpenAI accounts.

  • Deploy a custom ChatGPT web interface that supports markdown, prompt storage, and multi-person chats.
  • Create a private, web-based ChatGPT for use among friends without sharing your API key.
  • Clear and expandable codebase, ideal as a starting point for your next AI Next.js project.

demo

For a beginner-friendly version of the ChatGPT UI codebase, visit ChatGPT Minimal.

Prerequisites

You need an OpenAI or Azure OpenAI account.

Deployment

Refer to the Environment Variables section for necessary environment variables.

Deploy on Vercel

Click the button below to deploy on Vercel:

Deploy with Vercel

Deploy with Docker

For OpenAI account users:

docker run -d -p 3000:3000 \
   -e OPENAI_API_KEY="<REPLACE-ME>" \
   blrchen/chatgpt-lite

For Azure OpenAI account users:

docker run -d -p 3000:3000 \
   -e AZURE_OPENAI_API_BASE_URL="<REPLACE-ME>" \
   -e AZURE_OPENAI_API_KEY="<REPLACE-ME>" \
   -e AZURE_OPENAI_DEPLOYMENT="<REPLACE-ME>" \
   blrchen/chatgpt-lite

Development

Running Locally

  1. Install NodeJS 20.
  2. Clone the repository.
  3. Install dependencies with npm install.
  4. Copy .env.example to .env.local and update environment variables.
  5. Start the application using npm run dev.
  6. Visit http://localhost:3000 in your browser.

Running Locally with Docker

  1. Clone the repository and navigate to the root directory.
  2. Update the OPENAI_API_KEY environment variable in the docker-compose.yml file.
  3. Build the application using docker-compose build ..
  4. Start it by running docker-compose up -d.

Environment Variables

Required environment variables:

For OpenAI account:

Name Description Default Value
OPENAI_API_BASE_URL Use if you plan to use a reverse proxy for api.openai.com. https://api.openai.com
OPENAI_API_KEY Secret key string obtained from the OpenAI API website.
OPENAI_MODEL Model of GPT used gpt-3.5-turbo

For Azure OpenAI account:

Name Description
AZURE_OPENAI_API_BASE_URL Endpoint (e.g., https://xxx.openai.azure.com).
AZURE_OPENAI_API_KEY Key
AZURE_OPENAI_DEPLOYMENT Model deployment name

Contribution

PRs of all sizes are welcome.

chatgpt-lite's People

Contributors

0xlws avatar blrchen avatar fanweixiao avatar jcubic avatar orcame avatar pichuang avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

chatgpt-lite's Issues

copy & paste will add extra %20 to clipboard

sometime i ask gpt to give the code. directly copy & paste is ok, but some time format need readjust in the destination editor

click copy button at the output, and paste in the target editor, i see all [SPACE] are replaced with %20 as well as other ESCAPE code. for / \ and etc.

Hope we can fix that.

bug: Overwriting on Stream

When changing conversations while a response is streaming, newly selected conversation starts to receive the stream, possibly overwriting the original text.

To replicate:

Create two conversations.
In second convo, ask a long response like "Give me the plot of the Matrix movie in 5 paragpraphs". While response is streaming, switch conversations by selecting the other convo on the left hand side.

Model error message is not fully displayed

When a 400 error occurs on Azure OpenAI model calls, the detailed error message, such as "The response was filtered due to the prompt triggering Azure OpenAI’s content management policy. Please modify your prompt and retry. To learn more about our content filtering policies please read our documentation: https://go.microsoft.com/fwlink/?linkid=2198766" is not fully displayed in the error toast message box.

image

docker-compose只添加azure链接信息报错

您好,当我使用docker-compose部署时,配置文件仅添加了azure的相关参数。报错内容:[Error: The OpenAI API has encountered an error with a status code of 404 and message Not Found] 请问如何解决。

Integrate APIpie.ai

Founder here plugging my own product.

I tried to test our API with your app but found the UI doesn't permit changing the API Key / Base URL, it would be great to test but also APIpie.ai would be a great direct integration we have a huge range of models from different providers services and have also marked all Chat enhanced models (proper streaming and context memory) with subtype chatx so the models list can be filtered to only provide a list of models optimised for Chat experience, we are openai API compliant and we also update the models list frequently so would require no manual updating for new models if filtering on ChatX, you could further clean the list by removing duplicates if you don't mind what provider is serving the model.

https://apipie.ai/
https://discord.gg/fnVjanuCzB

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.