diff --git a/dist/buildinfo.json b/dist/buildinfo.json index 01bb75d0..e26e5736 100644 --- a/dist/buildinfo.json +++ b/dist/buildinfo.json @@ -1 +1 @@ -{"sha": "47f793d", "timestamp": 1700201645} +{"sha": "5eebcfe", "timestamp": 1700212771} diff --git a/dist/index.js b/dist/index.js index 80586ee7..553c6248 100644 --- a/dist/index.js +++ b/dist/index.js @@ -54,9 +54,9 @@ var Environment = class { // 检查更新的分支 UPDATE_BRANCH = "master"; // 当前版本 - BUILD_TIMESTAMP = 1700201645; + BUILD_TIMESTAMP = 1700212771; // 当前版本 commit id - BUILD_VERSION = "47f793d"; + BUILD_VERSION = "5eebcfe"; // 使用流模式 STREAM_MODE = true; // 安全模式 @@ -80,7 +80,7 @@ var Environment = class { // Cloudflare Token CLOUDFLARE_TOKEN = null; // Text Generation Model - WORKERS_CHAT_MODEL = "@cf/meta/llama-2-7b-chat-int8"; + WORKERS_CHAT_MODEL = "@cf/meta/llama-2-7b-chat-fp16"; // Text-to-Image Model WORKERS_IMAGE_MODEL = "@cf/stabilityai/stable-diffusion-xl-base-1.0"; }; @@ -1175,14 +1175,7 @@ async function makeResponse200(resp) { if (resp.status === 200) { return resp; } else { - let body = ""; - try { - body = await resp.text(); - console.error(body); - } catch (e) { - console.error(e); - } - return new Response(body, { + return new Response(resp.body, { status: 200, headers: { "Original-Status": resp.status, diff --git a/dist/timestamp b/dist/timestamp index 17f92f7c..28e0ac8d 100644 --- a/dist/timestamp +++ b/dist/timestamp @@ -1 +1 @@ -1700201645 +1700212771 diff --git a/src/utils.js b/src/utils.js index eea2f839..98fb5147 100644 --- a/src/utils.js +++ b/src/utils.js @@ -177,14 +177,7 @@ export async function makeResponse200(resp) { return resp; } else { // 如果返回4xx,5xx,Telegram会重试这个消息,后续消息就不会到达,所有webhook的错误都返回200 - let body = ''; - try { - body = await resp.text(); - console.error(body); - } catch (e) { - console.error(e); - } - return new Response(body, { + return new Response(resp.body, { status: 200, headers: { 'Original-Status': resp.status,