From b7425c952a34401d3c2a18573c1a15d9b43452e1 Mon Sep 17 00:00:00 2001 From: tbxark Date: Tue, 12 Nov 2024 11:04:56 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20telegram=20image=20url=20=E6=8B=BC?= =?UTF-8?q?=E6=8E=A5=E9=94=99=E8=AF=AF=20#295?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/buildinfo.json | 2 +- dist/index.js | 6 +++--- dist/timestamp | 2 +- src/telegram/handler/chat.ts | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/dist/buildinfo.json b/dist/buildinfo.json index 8dd6e4dd..7e303aa2 100644 --- a/dist/buildinfo.json +++ b/dist/buildinfo.json @@ -1 +1 @@ -{"sha":"5ff2ee1","timestamp":1730359461} \ No newline at end of file +{"sha":"74ab291","timestamp":1731380657} \ No newline at end of file diff --git a/dist/index.js b/dist/index.js index f6cea018..309bd0a4 100644 --- a/dist/index.js +++ b/dist/index.js @@ -211,8 +211,8 @@ const ENV_KEY_MAPPER = { WORKERS_AI_MODEL: "WORKERS_CHAT_MODEL" }; class Environment extends EnvironmentConfig { - BUILD_TIMESTAMP = 1730359461 ; - BUILD_VERSION = "5ff2ee1" ; + BUILD_TIMESTAMP = 1731380657 ; + BUILD_VERSION = "74ab291" ; I18N = loadI18n(); PLUGINS_ENV = {}; USER_CONFIG = createAgentUserConfig(); @@ -1844,7 +1844,7 @@ class ChatHandler { const file = await api.getFileWithReturns({ file_id: id }); const url = file.result.file_path; if (url) { - params.images = [url]; + params.images = [`${ENV.TELEGRAM_API_DOMAIN}/file/bot${context.SHARE_CONTEXT.botToken}/${url}`]; } } return chatWithLLM(message, params, context, null); diff --git a/dist/timestamp b/dist/timestamp index ff5f01a3..c396aa89 100644 --- a/dist/timestamp +++ b/dist/timestamp @@ -1 +1 @@ -1730359461 \ No newline at end of file +1731380657 \ No newline at end of file diff --git a/src/telegram/handler/chat.ts b/src/telegram/handler/chat.ts index df3703d0..414c61ff 100644 --- a/src/telegram/handler/chat.ts +++ b/src/telegram/handler/chat.ts @@ -99,7 +99,7 @@ export class ChatHandler implements MessageHandler { const file = await api.getFileWithReturns({ file_id: id }); const url = file.result.file_path; if (url) { - params.images = [url]; + params.images = [`${ENV.TELEGRAM_API_DOMAIN}/file/bot${context.SHARE_CONTEXT.botToken}/${url}`]; } } return chatWithLLM(message, params, context, null);