diff --git a/client/src/App.css b/client/src/App.css index 7c09adc..5eb1f2f 100644 --- a/client/src/App.css +++ b/client/src/App.css @@ -44,13 +44,16 @@ nav { .navPromptWrapper { border-bottom: 1px solid #ffffff33; padding: 10px; + height: 55vh; + overflow-y: auto; } .navPrompt { display: flex; align-items: center; padding: 10px; - column-gap: 5px; + column-gap: 20px; margin: 5px 0; + text-align: left; } .navPrompt p { font-size: 14px; diff --git a/client/src/App.js b/client/src/App.js index 389ce9b..1fe4bb8 100644 --- a/client/src/App.js +++ b/client/src/App.js @@ -6,6 +6,7 @@ import NewChat from "./components/NewChat"; import NavPrompt from "./components/NavPrompt"; import Loading from "./components/Loading"; import Error from "./components/Error"; +import NavLinks from "./components/NavLink"; function App() { const [showMenu, setShowMenu] = useState(false); @@ -103,6 +104,98 @@ function App() { ) )} + {chatLog.length > 0 && ( + + + + + + } + text="Clear Conversations" + setChatLog={setChatLog} + /> + )} + + {"discord_fill"} + + + + + + } + text="OpenAI Discord" + link="https://discord.com/invite/openai" + /> + + + + } + text="Updates & FAQ" + link="https://help.openai.com/en/collections/3742473-chatgpt" + />
diff --git a/client/src/components/NavLink.jsx b/client/src/components/NavLink.jsx new file mode 100644 index 0000000..6ec55d5 --- /dev/null +++ b/client/src/components/NavLink.jsx @@ -0,0 +1,23 @@ +import React from "react"; + +const NavLinks = ({ svg, link, text, setChatLog }) => { + const handleClick = (text) => { + if (text === "Clear Conversations") setChatLog([]); + }; + return ( + handleClick(text)} + > +
+ {svg} +

{text}

+
+
+ ); +}; + +export default NavLinks; diff --git a/index.js b/index.js index ef4b297..35d0b6a 100644 --- a/index.js +++ b/index.js @@ -22,8 +22,8 @@ app.post("/", async (req, res) => { const response = await openai.createCompletion({ model: "text-davinci-003", prompt: message, - max_tokens: 100, - temperature: 0.5, + max_tokens: 3000, + temperature: 0.3, }); res.json({ botResponse: response.data.choices[0].text }); });