Skip to content

Commit f24712b

Browse files
committed
prepare system instruction setting
1 parent ad85e67 commit f24712b

File tree

2 files changed

+20
-9
lines changed

2 files changed

+20
-9
lines changed

src/client/components/ChatV2/ChatV2.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export const ChatV2 = () => {
4949
const [prevResponse, setPrevResponse] = useLocalStorageState<{ id: string }>(`${localStoragePrefix}-prev-response`, { id: '' })
5050

5151
// States
52-
const [settingsModalOpen, setSettingsModalOpen] = useState(false)
52+
const [settingsModalOpen, setSettingsModalOpen] = useState(true)
5353
const [activePromptId, setActivePromptId] = useState('')
5454
const [fileName, setFileName] = useState<string>('')
5555
const [completion, setCompletion] = useState<string>('')
@@ -212,8 +212,7 @@ export const ChatV2 = () => {
212212

213213
useEffect(() => {
214214
// Fethces data from local storage according to chat
215-
console.log("course changed")
216-
215+
console.log('course changed')
217216
}, [course])
218217

219218
useEffect(() => {

src/client/components/ChatV2/SettingsModal.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { Close } from '@mui/icons-material'
2-
import { Box, IconButton, Modal, Typography } from '@mui/material'
2+
import { Box, IconButton, Modal, TextField, Typography } from '@mui/material'
33
import ModelSelector from './ModelSelector'
44
import { validModels } from '../../../config'
55
import React from 'react'
@@ -25,21 +25,33 @@ export const SettingsModal: React.FC<SettingsModalProps> = ({ open, setOpen, mod
2525
top: '50%',
2626
left: '50%',
2727
transform: 'translate(-50%, -50%)',
28+
display: 'flex',
29+
flexDirection: 'column',
30+
gap: '1.2rem',
31+
minWidth: 600,
2832
width: '85vw',
33+
maxWidth: 1000,
2934
minHeight: '70vh',
3035
bgcolor: 'background.paper',
3136
boxShadow: 24,
32-
p: 4,
37+
p: '2.5rem',
38+
borderRadius: '0.3rem',
3339
}}
3440
>
3541
<IconButton onClick={() => setOpen(false)} sx={{ position: 'absolute', top: 8, right: 8, color: 'grey.500' }}>
3642
<Close />
3743
</IconButton>
38-
<Typography id="modal-title" variant="h6" component="h2">
39-
Settings
44+
<Typography variant="h6" fontWeight={600}>
45+
Alustus
4046
</Typography>
41-
<ModelSelector currentModel={model} setModel={setModel} models={validModels.map((m) => m.name)} />
42-
<RagSelector currentRagIndex={currentRagIndex} setRagIndex={setRagIndex} ragIndices={ragIndices} />
47+
<Typography variant="body1">
48+
Alustuksella tarkoitetaan yleistason ohjeistusta keskustelulle. Kielimallia voi esimerkiksi pyytää käyttämään akateemista kieltä tai esittämään puutarhuria jota
49+
haastatellaan kaktusten hoidosta.
50+
</Typography>
51+
{/* <ModelSelector currentModel={model} setModel={setModel} models={validModels.map((m) => m.name)} /> */}
52+
{/* Disabled for now due to RAG not functioning cirreclty */}
53+
{/* <RagSelector currentRagIndex={currentRagIndex} setRagIndex={setRagIndex} ragIndices={ragIndices} /> */}
54+
<TextField multiline minRows={6} maxRows={10} label="Alustuksen sisältö" defaultValue="Olet avulias avustaja" />
4355
</Box>
4456
</Modal>
4557
)

0 commit comments

Comments
 (0)