Skip to content

Commit

Permalink
can not select model
Browse files Browse the repository at this point in the history
  • Loading branch information
JYC0413 committed Mar 22, 2024
1 parent db9838c commit ddb73e6
Showing 1 changed file with 21 additions and 18 deletions.
39 changes: 21 additions & 18 deletions components/Chat/ModelSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,24 +45,27 @@ export const ModelSelect = () => {
{t('Model')}
</label>
<div className="w-full rounded-lg border border-neutral-200 bg-transparent pr-2 text-neutral-900 dark:border-neutral-600 dark:text-white">
<select
className="w-full bg-transparent p-2"
placeholder={t('Select a model') || ''}
value={selectedConversation?.model?.id || defaultModelId}
onChange={handleChange}
>
{models.map((model) => (
<option
key={model.id}
value={model.id}
className="dark:bg-[#343541] dark:text-white"
>
{model.id === defaultModelId
? `Default (${model.id})`
: model.id}
</option>
))}
</select>
{/*<select*/}
{/* className="w-full bg-transparent p-2"*/}
{/* placeholder={t('Select a model') || ''}*/}
{/* value={selectedConversation?.model?.id || defaultModelId}*/}
{/* onChange={handleChange}*/}
{/*>*/}
{/* {models.map((model) => (*/}
{/* <option*/}
{/* key={model.id}*/}
{/* value={model.id}*/}
{/* className="dark:bg-[#343541] dark:text-white"*/}
{/* >*/}
{/* {model.id === defaultModelId*/}
{/* ? `Default (${model.id})`*/}
{/* : model.id}*/}
{/* </option>*/}
{/* ))}*/}
{/*</select>*/}
<div className="w-full p-2">
{selectedConversation?.model?.id || defaultModelId}
</div>
</div>
</div>
);
Expand Down

0 comments on commit ddb73e6

Please sign in to comment.