Improve LLM Options

This commit is contained in:
Enrico Ros
2023-06-13 19:04:45 -07:00
parent f9ebd6473f
commit 983b9e09a6
+10 -6
View File
@@ -3,6 +3,8 @@ import { shallow } from 'zustand/shallow';
import { Button, Divider, FormControl, FormLabel, Input, Switch, Typography } from '@mui/joy';
import DeleteOutlineIcon from '@mui/icons-material/DeleteOutline';
import VisibilityIcon from '@mui/icons-material/Visibility';
import VisibilityOffIcon from '@mui/icons-material/VisibilityOff';
import { GoodModal } from '~/common/components/GoodModal';
import { useUIStateStore } from '~/common/state/store-ui';
@@ -60,22 +62,24 @@ export function LLMOptions(props: { id: DLLMId }) {
<FormControl orientation='horizontal' sx={{ flexWrap: 'wrap', alignItems: 'center' }}>
<FormLabel sx={{ minWidth: 80 }}>
Visibility
Visible
</FormLabel>
<Switch checked={!llm.hidden} onChange={handleLlmVisibilityToggle}
endDecorator={!llm.hidden ? 'Show' : 'Hide'}
slotProps={{ endDecorator: { sx: { minWidth: 26 } } }} />
endDecorator={!llm.hidden ? <VisibilityIcon /> : <VisibilityOffIcon />}
slotProps={{ endDecorator: { sx: { minWidth: 26 } } }}
sx={{ ml: 0, mr: 'auto' }} />
{/*<Checkbox color='neutral' checked={llm.tags?.includes('chat')} readOnly disabled label='Chat' sx={{ ml: 4 }} />*/}
{/*<Checkbox color='neutral' checked={llm.tags?.includes('stream')} readOnly disabled label='Stream' sx={{ ml: 4 }} />*/}
</FormControl>
<FormControl orientation='horizontal' sx={{ flexWrap: 'nowrap' }}>
<FormLabel sx={{ minWidth: 80 }}>
Info
Details
</FormLabel>
<Typography level='body2' sx={{ display: 'block' }}>
[{llm.id}]: {llm.options.llmRef && `id: ${llm.options.llmRef} · `} context tokens: {llm.contextTokens} · {
llm.created && `created: ${(new Date(llm.created * 1000)).toLocaleString()}`} · description: {llm.description} · tags: {llm.tags.join(', ')}
[{llm.id}]: {llm.options.llmRef && `${llm.options.llmRef} · `} context tokens: {llm.contextTokens} · {
llm.created && `created: ${(new Date(llm.created * 1000)).toLocaleString()}`} · description: {llm.description}
{/*· tags: {llm.tags.join(', ')}*/}
</Typography>
</FormControl>