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

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

Merged
merged 2 commits into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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