mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-17 08:50:15 +01:00
Fixes (#313)
* 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:
parent
26152d7e5f
commit
8d75b25104
3 changed files with 2 additions and 2 deletions
|
|
@ -39,7 +39,6 @@ router.get('/', async function (req, res) {
|
||||||
key || palmUser ? { userProvide: palmUser, availableModels: ['chat-bison', 'text-bison'] } : false;
|
key || palmUser ? { userProvide: palmUser, availableModels: ['chat-bison', 'text-bison'] } : false;
|
||||||
const azureOpenAI = !!process.env.AZURE_OPENAI_KEY;
|
const azureOpenAI = !!process.env.AZURE_OPENAI_KEY;
|
||||||
const apiKey = process.env.OPENAI_KEY || process.env.AZURE_OPENAI_API_KEY;
|
const apiKey = process.env.OPENAI_KEY || process.env.AZURE_OPENAI_API_KEY;
|
||||||
console.log('API KEY', apiKey);
|
|
||||||
const openAI =
|
const openAI =
|
||||||
apiKey
|
apiKey
|
||||||
? { availableModels: getOpenAIModels(), userProvide: apiKey === 'user_provided' }
|
? { availableModels: getOpenAIModels(), userProvide: apiKey === 'user_provided' }
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="theme-color" content="#343541">
|
<meta name="theme-color" content="#343541">
|
||||||
<title>%VITE_APP_TITLE%</title>
|
<title>ChatGPT Clone</title>
|
||||||
<link
|
<link
|
||||||
rel="shortcut icon"
|
rel="shortcut icon"
|
||||||
href="#"
|
href="#"
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ export default function Chat() {
|
||||||
// conversationId (in url) should always follow conversation?.conversationId, unless conversation is null
|
// conversationId (in url) should always follow conversation?.conversationId, unless conversation is null
|
||||||
navigate(`/chat/${conversation?.conversationId}`);
|
navigate(`/chat/${conversation?.conversationId}`);
|
||||||
}
|
}
|
||||||
|
document.title = conversation?.title || import.meta.env.VITE_APP_TITLE || 'Chat';
|
||||||
}, [conversation, conversationId]);
|
}, [conversation, conversationId]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue