change messaging

This commit is contained in:
Mckay Wrigley 2023-03-29 15:21:50 -06:00
parent 85c4f88a06
commit e020de47ce
2 changed files with 25 additions and 16 deletions

View File

@ -1,9 +1,5 @@
# Chatbot UI
**WE HAVE BEEN TOLD TO TAKE DOWN CHATBOTUI.COM DOWN BY OPENAI EFFECTIVE IMMEDIATELY**
**WE ARE WORKING ON GETTING THIS RESOLVED**
Chatbot UI is an advanced chatbot kit for OpenAI's chat models built on top of [Chatbot UI Lite](https://github.com/mckaywrigley/chatbot-ui-lite) using Next.js, TypeScript, and Tailwind CSS.
See a [demo](https://twitter.com/mckaywrigley/status/1636103188733640704).
@ -64,11 +60,14 @@ Fork Chatbot UI on Replit [here](https://replit.com/@MckayWrigley/chatbot-ui-pro
**Docker**
Build locally:
```shell
docker build -t chatgpt-ui .
docker run -e OPENAI_API_KEY=xxxxxxxx -p 3000:3000 chatgpt-ui
```
Pull from ghcr:
```
docker run -e OPENAI_API_KEY=xxxxxxxx -p 3000:3000 ghcr.io/mckaywrigley/chatbot-ui:main
```
@ -111,10 +110,10 @@ You should be able to start chatting.
When deploying the application, the following environment variables can be set:
| Environment Variable | Default value | Description |
|----------------------|------------------|---------------------------------------------------------|
| OPENAI_API_KEY | | The default API key used for authentication with OpenAI |
| DEFAULT_MODEL | `gpt-3.5-turbo` | The default model to use on new conversations |
| Environment Variable | Default value | Description |
| -------------------- | --------------- | ------------------------------------------------------- |
| OPENAI_API_KEY | | The default API key used for authentication with OpenAI |
| DEFAULT_MODEL | `gpt-3.5-turbo` | The default model to use on new conversations |
If you do not provide an OpenAI API key with `OPENAI_API_KEY`, users will have to provide their own key.
If you don't have an OpenAI API key, you can get one [here](https://platform.openai.com/account/api-keys).

View File

@ -1,11 +1,10 @@
import { Conversation, Message } from '@/types/chat';
import { IconArrowDown } from '@tabler/icons-react';
import { KeyValuePair } from '@/types/data';
import { ErrorMessage } from '@/types/error';
import { OpenAIModel, OpenAIModelID } from '@/types/openai';
import { Prompt } from '@/types/prompt';
import { throttle } from '@/utils';
import { IconClearAll, IconKey, IconSettings } from '@tabler/icons-react';
import { IconArrowDown, IconClearAll, IconSettings } from '@tabler/icons-react';
import { useTranslation } from 'next-i18next';
import {
FC,
@ -151,16 +150,27 @@ export const Chat: FC<Props> = memo(
}, [messagesEndRef]);
return (
<div className="overflow-hidden relative flex-1 bg-white dark:bg-[#343541]">
<div className="relative flex-1 overflow-hidden bg-white dark:bg-[#343541]">
{!(apiKey || serverSideApiKeyIsSet) ? (
<div className="mx-auto flex h-full w-[300px] flex-col justify-center space-y-6 sm:w-[500px]">
<div className="mx-auto mb-5 text-gray-800 dark:text-gray-100">
<IconKey size={36} />
<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
</div>
<div className="text-center text-2xl font-semibold text-gray-800 dark:text-gray-100">
{t('OpenAI API Key Required')}
<div className="text-center text-lg text-black dark:text-white">
<div className="mb-8">{`Chatbot UI is an open source clone of OpenAI's ChatGPT UI.`}</div>
<div className="mb-2 font-bold">
Important: Chatbot UI 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.
</div>
<div className="mb-2">
It is <span className="italic">only</span> used to communicate
with their API.
</div>
<div className="mb-2">
{t(
'Please set your OpenAI API key in the bottom left of the sidebar.',