Skip to content
This repository has been archived by the owner on Sep 15, 2024. It is now read-only.

Commit

Permalink
fix: Yidadaa#3241 should not ensure openai url non-empty (#88)
Browse files Browse the repository at this point in the history
* Merge pull request Yidadaa#3233 from nanaya-tachibana/nanaya/model-selection

* fix: Yidadaa#3241 should not ensure openai url non-empty

---------

Co-authored-by: Yidadaa <yidadaa@qq.com>
  • Loading branch information
H0llyW00dzZ and Yidadaa authored Nov 13, 2023
1 parent 328bcea commit d0798e4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 7 additions & 5 deletions app/components/model-config.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,13 @@ export function ModelConfigList(props: {
);
}}
>
{allModels.map((v, i) => (
<option value={v.name} key={i} disabled={!v.available}>
{v.name}
</option>
))}
{allModels
.filter((v) => v.available)
.map((v, i) => (
<option value={v.name} key={i}>
{v.displayName}
</option>
))}
</Select>
</ListItem>
{isDalleModel && (
Expand Down
2 changes: 1 addition & 1 deletion app/store/access.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const useAccessStore = createPersistStore(
},

isValidOpenAI() {
return ensure(get(), ["openaiUrl", "openaiApiKey"]);
return ensure(get(), ["openaiApiKey"]);
},

isValidAzure() {
Expand Down

0 comments on commit d0798e4

Please sign in to comment.