From 75b35615948b10f59f21472e61f2420081d75812 Mon Sep 17 00:00:00 2001 From: sjn Date: Fri, 14 Apr 2023 17:00:46 +0800 Subject: [PATCH 1/2] Update sync.yml change schedule with every day --- .github/workflows/sync.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 15d32407..a4c14c84 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -5,7 +5,7 @@ permissions: on: schedule: - - cron: "0 * * * *" # every hour + - cron: "0 0 * * *" # every day workflow_dispatch: jobs: From 789f3d993c227209de1419a2f7d8349100223e93 Mon Sep 17 00:00:00 2001 From: "kirk.shan" Date: Thu, 18 May 2023 10:25:06 +0800 Subject: [PATCH 2/2] fix content-type = text/event-stream;charset=utf-8 --- app/client/platforms/openai.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index 2a28debd..d833e8c5 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -99,7 +99,9 @@ export class ChatGPTApi implements LLMApi { if ( !res.ok || - res.headers.get("content-type") !== EventStreamContentType || + !res.headers + .get("content-type") + ?.startsWith(EventStreamContentType) || res.status !== 200 ) { const responseTexts = [responseText];