lloydzhou преди 1 година
родител
ревизия
d58b99d602
променени са 1 файла, в които са добавени 3 реда и са изтрити 1 реда
  1. 3 1
      app/client/platforms/openai.ts

+ 3 - 1
app/client/platforms/openai.ts

@@ -287,7 +287,9 @@ export class ChatGPTApi implements LLMApi {
         const funcs = {
           get_current_weather: (args: any) => {
             console.log("call get_current_weather", args);
-            return "30";
+            return new Promise((resolve) => {
+              setTimeout(() => resolve("30"), 3000);
+            });
           },
         };
         const finish = () => {