89560363 by RSA

fix

1 parent eece0986
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
5 <link rel="icon" href="%PUBLIC_URL%/favicon.ico" /> 5 <link rel="icon" href="%PUBLIC_URL%/favicon.ico" />
6 <meta name="viewport" content="width=device-width, initial-scale=1" /> 6 <meta name="viewport" content="width=device-width, initial-scale=1" />
7 <meta name="theme-color" content="#000000" /> 7 <meta name="theme-color" content="#000000" />
8 <meta name="robots" content="noindex">
8 <meta 9 <meta
9 name="description" 10 name="description"
10 content="Web site created using create-react-app" 11 content="Web site created using create-react-app"
......
1 const SideMenu = ({ clearChat, currentModel, setCurrentModel, models, setTemperature, temperature }) => 1 const SideMenu = ({ clearChat, currentModel, setCurrentModel, models, setTemperature, temperature }) =>
2 <aside className="sidemenu"> 2 <aside className="sidemenu">
3 <div className="ai-logo-container">
4 <img className="ai-logo" src="../assets/images/AIPRO-WHITE.png" height="50px"/>
5 </div>
3 <div className="side-menu-button" onClick={clearChat}> 6 <div className="side-menu-button" onClick={clearChat}>
4 <span>+</span> 7 <span>+</span>
5 New Chat 8 New Chat
6 </div> 9 </div>
7 <div className="models"> 10 <div className="models">
8 <label className="side-label">Model</label> 11 <label className="side-label">Model</label>
9 <select 12 <select
10 // active if model is select is currentModel 13 // active if model is select is currentModel
11 value={currentModel} 14 value={currentModel}
12 className="select-models" 15 className="select-models"
...@@ -14,41 +17,41 @@ const SideMenu = ({ clearChat, currentModel, setCurrentModel, models, setTempera ...@@ -14,41 +17,41 @@ const SideMenu = ({ clearChat, currentModel, setCurrentModel, models, setTempera
14 setCurrentModel(e.target.value) 17 setCurrentModel(e.target.value)
15 }}> 18 }}>
16 {models && models.length ? models.map((model, index) => ( 19 {models && models.length ? models.map((model, index) => (
17 <option 20 <option
18 key={model.id} 21 key={model.id}
19 value={model.id}>{model.id}</option> 22 value={model.id}>{model.id}</option>
20 )) : <option 23 )) : <option
21 key={"text-davinci-003"} 24 key={"text-davinci-003"}
22 value={"text-davinci-003"}>{"text-davinci-003"}</option>} 25 value={"text-davinci-003"}>{"text-davinci-003"}</option>}
23 </select> 26 </select>
24 27
25 <Button 28 <Button
26 text="Smart - Davinci" 29 text="Smart - Davinci"
27 onClick={()=>setCurrentModel("text-davinci-003")} /> 30 onClick={()=>setCurrentModel("text-davinci-003")} />
28 <Button 31 <Button
29 text="Code - Crushman" 32 text="Code - Crushman"
30 onClick={()=>setCurrentModel("code-cushman-001")} /> 33 onClick={()=>setCurrentModel("code-cushman-001")} />
31 <span className="info"> 34 <span className="info">
32 The model parameter controls the engine used to generate the response. Davinci produces best results. 35 The model parameter controls the engine used to generate the response. Davinci produces best results.
33 </span> 36 </span>
34 <label className="side-label" >Temperature</label> 37 <label className="side-label" >Temperature</label>
35 <input 38 <input
36 className="select-models" 39 className="select-models"
37 type="number" 40 type="number"
38 onChange={(e)=> setTemperature(e.target.value)} 41 onChange={(e)=> setTemperature(e.target.value)}
39 min="0" 42 min="0"
40 max="1" 43 max="1"
41 step="0.1" 44 step="0.1"
42 value={temperature} 45 value={temperature}
43 /> 46 />
44 <Button 47 <Button
45 text="0 - Logical" 48 text="0 - Logical"
46 onClick={()=>setTemperature(0)} /> 49 onClick={()=>setTemperature(0)} />
47 <Button 50 <Button
48 text="0.5 - Balanced" 51 text="0.5 - Balanced"
49 onClick={()=>setTemperature(0.5)} /> 52 onClick={()=>setTemperature(0.5)} />
50 <Button 53 <Button
51 text="1 - Creative" 54 text="1 - Creative"
52 onClick={()=>setTemperature(1)} /> 55 onClick={()=>setTemperature(1)} />
53 <span className="info"> 56 <span className="info">
54 The temperature parameter controls the randomness of the model. 0 is the most logical, 1 is the most creative. 57 The temperature parameter controls the randomness of the model. 0 is the most logical, 1 is the most creative.
...@@ -57,8 +60,8 @@ const SideMenu = ({ clearChat, currentModel, setCurrentModel, models, setTempera ...@@ -57,8 +60,8 @@ const SideMenu = ({ clearChat, currentModel, setCurrentModel, models, setTempera
57 </aside> 60 </aside>
58 61
59 const Button = ({ onClick, text }) => 62 const Button = ({ onClick, text }) =>
60 <div 63 <div
61 className="button-picker" 64 className="button-picker"
62 onClick={onClick}> 65 onClick={onClick}>
63 {text} 66 {text}
64 </div> 67 </div>
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!