Skip to content

Commit

Permalink
Changes to README, web UI, added Amigo logo, etc (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardPrentice authored Dec 9, 2023
1 parent 6a07b94 commit 8e4a772
Show file tree
Hide file tree
Showing 37 changed files with 197 additions and 192 deletions.
8 changes: 5 additions & 3 deletions .env.local.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,11 @@ GOOGLE_API_KEY=
GOOGLE_CSE_ID=

# MongoDB URI for Local
MONGODB_URI=mongodb://root:example@127.0.0.1:27017/
MONGODB_DB=chatui
MONGODB_URI=mongodb://root:password@127.0.0.1:27017/
MONGO_INITDB_ROOT_USERNAME=root
MONGO_INITDB_ROOT_PASSWORD=password
MONGODB_DB=open-gpt

# MongoDB URI for docker-compose
# MONGODB_URI=mongodb://root:example@mongo:27017/
# MONGO_INITDB_ROOT_USERNAME=root
Expand All @@ -29,7 +32,6 @@ MONGODB_DB=chatui
NEXTAUTH_ENABLED=false
NEXTAUTH_EMAIL_PATTERN=.+@example.com
NEXTAUTH_URL=http://localhost:3000
# must replace if you use NextAuth
NEXTAUTH_SECRET=dummy
NEXTAUTH_SESSION_MAX_AGE=86400
GITHUB_CLIENT_ID=
Expand Down
118 changes: 59 additions & 59 deletions .github/workflows/deploy-docker-image.yaml
Original file line number Diff line number Diff line change
@@ -1,69 +1,69 @@
name: Docker
# name: Docker

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# # This workflow uses actions that are not certified by GitHub.
# # They are provided by a third-party and are governed by
# # separate terms of service, privacy policy, and support
# # documentation.

on:
push:
branches: ['main']
# on:
# push:
# branches: ['main']

env:
# Use docker.io for Docker Hub if empty
REGISTRY: ghcr.io
# github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }}
# env:
# # Use docker.io for Docker Hub if empty
# REGISTRY: ghcr.io
# # github.repository as <account>/<repo>
# IMAGE_NAME: ${{ github.repository }}

jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
# jobs:
# build:
# runs-on: ubuntu-latest
# permissions:
# contents: read
# packages: write
# # This is used to complete the identity challenge
# # with sigstore/fulcio when running outside of PRs.
# id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v3
# steps:
# - name: Checkout repository
# uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2.1.0
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2.1.0

# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
# # Workaround: https://github.com/docker/build-push-action/issues/461
# - name: Setup Docker buildx
# uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf

# Login against a Docker registry except on PR
# https://github.com/docker/login-action
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# # Login against a Docker registry except on PR
# # https://github.com/docker/login-action
# - name: Log into registry ${{ env.REGISTRY }}
# if: github.event_name != 'pull_request'
# uses: docker/login-action@28218f9b04b4f3f62068d7b6ce6ca5b26e35336c
# with:
# registry: ${{ env.REGISTRY }}
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
# # Extract metadata (tags, labels) for Docker
# # https://github.com/docker/metadata-action
# - name: Extract Docker metadata
# id: meta
# uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
# with:
# images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
platforms: "linux/amd64,linux/arm64"
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# # Build and push Docker image with Buildx (don't push on PR)
# # https://github.com/docker/build-push-action
# - name: Build and push Docker image
# id: build-and-push
# uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
# with:
# context: .
# platforms: "linux/amd64,linux/arm64"
# push: ${{ github.event_name != 'pull_request' }}
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# cache-from: type=gha
# cache-to: type=gha,mode=max
9 changes: 9 additions & 0 deletions CONTACT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Contact Us!

Firstly, thank you for checking out this project!

The original author of this project is the incredible [McKay](https://twitter.com/mckaywrigley) so please redirect any gratitude his way!

If you'd like to discuss the project's current status, [AmigoAI Consulting](https://amigoapp.ai) is currently maintaining this project. The best way to get in touch is to email us at `edward {AT} amigoapp.ai`.

You can also find us [on Twitter](https://twitter.com/amigoai_) 🐦
14 changes: 14 additions & 0 deletions FEATURES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# OpenGPT | Free AI Chat UI

# Features, Architecture and Roadmap

- SSO Auth(Google, GitHub)
- ChatGPT compatible plugins
- Python Interpreter Plugin
- Persitent storage(MongoDB)
- IME support

[Contact Us](CONTACT.md)



12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ include .env
.PHONY: all

build:
docker build -t chatbot-ui .
docker build -t open-gpt .

run:
export $(cat .env | xargs)
docker stop chatbot-ui || true && docker rm chatbot-ui || true
docker run --name chatbot-ui --rm -e OPENAI_API_KEY=${OPENAI_API_KEY} -p 3000:3000 chatbot-ui
docker stop open-gpt || true && docker rm open-gpt || true
docker run --name open-gpt --rm -e OPENAI_API_KEY=${OPENAI_API_KEY} -p 3000:3000 open-gpt

logs:
docker logs -f chatbot-ui
docker logs -f open-gpt

push:
docker tag chatbot-ui:latest ${DOCKER_USER}/chatbot-ui:${DOCKER_TAG}
docker push ${DOCKER_USER}/chatbot-ui:${DOCKER_TAG}
docker tag open-gpt:latest ${DOCKER_USER}/open-gpt:${DOCKER_TAG}
docker push ${DOCKER_USER}/open-gpt:${DOCKER_TAG}
70 changes: 18 additions & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,28 @@
# Smart Chatbot UI
# OpenGPT | Free AI Chat UI

This repo is forked from [chatbot-ui](https://github.com/mckaywrigley/chatbot-ui).
## News

This repository is highly experimental, so please do not expect compatibility when performing updates.
Forked from the amazing project from McKay of [Twitter](https://twitter.com/mckaywrigley) fame.

## [DEMO](https://smart-chatbot-ui.vercel.app/)
This project is actively maintained and will be extended to support

- Do not input personal information.
- Conversation, prompts, folders are stored in mongodb.
- Streaming response is not working in vercel environment.
- Plugins are not working for vercel timeout limitation.
Initial focus is on merging all outstanding PRs and fixing bugs.

## Additional Features
## About

- SSO Auth(Google, GitHub)
- ChatGPT compatible plugins
- Python Interpreter Plugin
- Persitent storage(MongoDB)
- IME support
An open source UI for use with cloud and local LLMs. Integrates with a wide range of models.

It is built with [Next.js](https://nextjs.org/) and [Tailwind CSS](https://tailwindcss.com/).

### [Launch OpenGPT now!](https://sage-gnome-98d99a.netlify.app/)

Please only use with information you're happy to share 😉

![Chatbot UI](./docs/screenshot_2023-05-08.png)

## Updates

- Chatbot UI will be updated over time.
- Expect frequent improvements.

**Recent updates:**

- [x] Python Interpreter (5/8/23)
- [x] Multiple Users with MongoDB Support (4/19/23)
- [x] Plugins(ChatGPT compatible) (4/17/23)
- [x] SSO Auth(email pattern matching only) (4/15/23)
- [x] Prompt templates (3/27/23)
- [x] Regenerate & edit responses (3/25/23)
- [x] Folders (3/24/23)
- [x] Search chat content (3/23/23)
- [x] Stop message generation (3/22/23)
- [x] Import/Export chats (3/22/23)
- [x] Custom system prompt (3/21/23)
- [x] Error handling (3/20/23)
- [x] GPT-4 support (access required) (3/20/23)
- [x] Search conversations (3/19/23)
- [x] Code syntax highlighting (3/18/23)
- [x] Toggle sidebar (3/18/23)
- [x] Conversation naming (3/18/23)
- [x] GitHub flavored markdown (3/18/23)
- [x] Add OpenAI API key in app (3/18/23)
- [x] Markdown support (3/17/23)
## Technical Specs

[Features](FEATURES.md)

## Deploy

Expand Down Expand Up @@ -128,7 +103,7 @@ When deploying the application, the following environment variables can be set:
| GOOGLE_API_KEY | | See [Custom Search JSON API documentation][GCSE] |
| GOOGLE_CSE_ID | | See [Custom Search JSON API documentation][GCSE] |
| MONGODB_URI | | See [Official Document](https://www.mongodb.com/docs/manual/reference/connection-string/) |
| MONGODB_DB | `chatui` | MongoDB database name |
| MONGODB_DB | `opengpt` | MongoDB database name |
| NEXTAUTH_ENABLED | `false` | Enable SSO authentication. set 'true' or 'false' |
| NEXTAUTH_EMAIL_PATTERN | | The email regex pattern granted access to chatbot-ui (ex `.+@example.com`) |
| NEXTAUTH_URL | `http://localhost:3000` | NextAuth Settings. See [Official Document](https://next-auth.js.org/configuration/options) |
Expand Down Expand Up @@ -209,13 +184,4 @@ PLUGINS_INTERNAL=wikipedia_search,google_search,python_interpreter
PYTHON_INTERPRETER_BACKEND=http://localhost:8080/api/run
```

## Vercel

- streaming response is not supported in vercel.
- plugin executing fails because of the timeout limit is too short in free plan.

## Contact

If you have any questions, feel free to reach out to me on [Twitter](https://twitter.com/santa128bit).

[GCSE]: https://developers.google.com/custom-search/v1/overview
[Contact Us](CONTACT.md)
12 changes: 5 additions & 7 deletions components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -206,22 +206,20 @@ export const Chat = memo(() => {
{!(apiKey || serverSideApiKeyIsSet) ? (
<div className="mx-auto flex h-full w-[300px] flex-col justify-center space-y-6 sm:w-[600px]">
<div className="text-center text-4xl font-bold text-black dark:text-white">
Welcome to Chatbot UI
Welcome to OpenGPT
</div>
<div className="text-center text-lg text-black dark:text-white">
<div className="mb-8">{`Smart Chatbot UI is an open source clone of OpenAI's ChatGPT UI.`}</div>
<div className="mb-8">{`OpenGPT source clone of OpenAI's ChatGPT UI.`}</div>
<div className="mb-2 font-bold">
Important: Chatbot UI is 100% unaffiliated with OpenAI.
Important: OpenGPT is 100% unaffiliated with OpenAI.
</div>
</div>
<div className="text-center text-gray-500 dark:text-gray-400">
<div className="mb-2">
Chatbot UI allows you to plug in your API key to use this UI
with their API.
OpenGPT allows you to safely use your OpenAI API Key and pay as you go.
</div>
<div className="mb-2">
It is <span className="italic">only</span> used to communicate
with their API.
It is <span className="italic">only</span> used to communicate with their API.
</div>
<div className="mb-2">
{t(
Expand Down
6 changes: 3 additions & 3 deletions components/Chat/ChatInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -478,16 +478,16 @@ export const ChatInput = ({ onSend, onRegenerate, textareaRef }: Props) => {
</ChatInputContainer>
<div className="px-3 pt-2 pb-3 text-center text-[12px] text-black/50 dark:text-white/50 md:px-4 md:pt-3 md:pb-6">
<a
href="https://github.com/dotneet/smart-chatbot-ui"
href="https://github.com/AmigoAppAI/open-gpt"
target="_blank"
rel="noreferrer"
className="underline"
>
Smart ChatBot UI
OpenGPT
</a>
.{' '}
{t(
"Smart Chatbot UI is an advanced chatbot kit for OpenAI's chat models aiming to mimic ChatGPT's interface and functionality.",
"Free and Open Source alternative to ChatGPT. Made with ❤️",
)}
</div>
</div>
Expand Down
Loading

0 comments on commit 8e4a772

Please sign in to comment.