Merge branch 'Yidadaa:main' into main

This commit is contained in:
Hk-Gosuto 2023-07-07 11:26:08 +08:00 committed by GitHub
commit 0569b6023a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 5 deletions

View File

@ -254,13 +254,15 @@ export class ChatGPTApi implements LLMApi {
});
const resJson = (await res.json()) as OpenAIListModelResponse;
const chatModels = resJson.data.filter((m) => m.id.startsWith("gpt-"));
const chatModels = resJson.data?.filter((m) => m.id.startsWith("gpt-"));
console.log("[Models]", chatModels);
return chatModels.map((m) => ({
name: m.id,
available: true,
}));
return (
chatModels?.map((m) => ({
name: m.id,
available: true,
})) || []
);
}
}
export { OpenaiPath };

View File

@ -282,6 +282,7 @@
display: flex;
align-items: center;
justify-content: center;
z-index: 999;
&-content {
.list {