* refactor(endpoints.js): remove console.log statement
refactor(index.html): change title to "ChatGPT Clone"

* feat(Chat.jsx): set document title to conversation title or VITE_APP_TITLE or 'Chat' if conversation is null
This commit is contained in:
Danny Avila 2023-05-18 07:45:07 -04:00 committed by GitHub
parent 26152d7e5f
commit 8d75b25104
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 2 deletions

View file

@ -39,7 +39,6 @@ router.get('/', async function (req, res) {
key || palmUser ? { userProvide: palmUser, availableModels: ['chat-bison', 'text-bison'] } : false;
const azureOpenAI = !!process.env.AZURE_OPENAI_KEY;
const apiKey = process.env.OPENAI_KEY || process.env.AZURE_OPENAI_API_KEY;
console.log('API KEY', apiKey);
const openAI =
apiKey
? { availableModels: getOpenAIModels(), userProvide: apiKey === 'user_provided' }

View file

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8" />
<meta name="theme-color" content="#343541">
<title>%VITE_APP_TITLE%</title>
<title>ChatGPT Clone</title>
<link
rel="shortcut icon"
href="#"

View file

@ -53,6 +53,7 @@ export default function Chat() {
// conversationId (in url) should always follow conversation?.conversationId, unless conversation is null
navigate(`/chat/${conversation?.conversationId}`);
}
document.title = conversation?.title || import.meta.env.VITE_APP_TITLE || 'Chat';
}, [conversation, conversationId]);
useEffect(() => {