Explorar el Código

🐛 fix(openai): 上次 commit 后 openai.ts 文件中出现类型不匹配的 bug

frostime hace 1 año
padre
commit
3486954e07
Se han modificado 1 ficheros con 4 adiciones y 0 borrados
  1. 4 0
      app/client/platforms/openai.ts

+ 4 - 0
app/client/platforms/openai.ts

@@ -411,13 +411,17 @@ export class ChatGPTApi implements LLMApi {
       return [];
     }
 
+    //由于目前 OpenAI 的 disableListModels 默认为 true,所以当前实际不会运行到这场
+    let seq = 1000; //同 Constant.ts 中的排序保持一致
     return chatModels.map((m) => ({
       name: m.id,
       available: true,
+      sorted: seq++,
       provider: {
         id: "openai",
         providerName: "OpenAI",
         providerType: "openai",
+        sorted: 1,
       },
     }));
   }