Skip to content

Commit

Permalink
feat: /img 显示图片生成模型
Browse files Browse the repository at this point in the history
  • Loading branch information
TBXark committed Dec 24, 2024
1 parent e9ceae4 commit 04d7f7d
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 11 deletions.
2 changes: 1 addition & 1 deletion dist/buildinfo.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/lib/core/src/config/version.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const BUILD_TIMESTAMP = 1735035314;
export const BUILD_VERSION = '87f7151';
export const BUILD_TIMESTAMP = 1735035887;
export const BUILD_VERSION = 'e9ceae4';
2 changes: 1 addition & 1 deletion packages/lib/core/src/telegram/callback_query/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export class ModelListCallbackQueryHandler implements CallbackQueryHandler {
const message: Telegram.EditMessageTextParams = {
chat_id: query.message?.chat.id || 0,
message_id: query.message?.message_id || 0,
text: `${agent} ${ENV.I18N.callback_query.select_model}`,
text: `${agent} | ${ENV.I18N.callback_query.select_model}`,
reply_markup: {
inline_keyboard: await this.createKeyboard(models, agent, page),
},
Expand Down
7 changes: 5 additions & 2 deletions packages/lib/core/src/telegram/command/system.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ export class ImgCommandHandler implements CommandHandler {
handle = async (message: Telegram.Message, subcommand: string, context: WorkerContext): Promise<Response> => {
const sender = MessageSender.fromMessage(context.SHARE_CONTEXT.botToken, message);
if (subcommand === '') {
const imgAgent = loadImageGen(context.USER_CONFIG);
const text = `${ENV.I18N.command.help.img}\n\n${imgAgent?.name || 'Nan'} | ${imgAgent?.model(context.USER_CONFIG) || 'Nan'}`;
const params: Telegram.SendMessageParams = {
chat_id: message.chat.id,
text: ENV.I18N.command.help.img,
text,
reply_markup: {
inline_keyboard: [[
{
Expand Down Expand Up @@ -294,9 +296,10 @@ export class ModelsCommandHandler implements CommandHandler {
handle = async (message: Telegram.Message, subcommand: string, context: WorkerContext): Promise<Response> => {
const sender = MessageSender.fromMessage(context.SHARE_CONTEXT.botToken, message);
const chatAgent = loadChatLLM(context.USER_CONFIG);
const text = `${chatAgent?.name || 'Nan'} | ${chatAgent?.model(context.USER_CONFIG) || 'Nan'}`;
const params: Telegram.SendMessageParams = {
chat_id: message.chat.id,
text: `${chatAgent?.name || 'Nan'} | ${chatAgent?.model(context.USER_CONFIG) || 'Nan'}`,
text,
reply_markup: {
inline_keyboard: [[
{
Expand Down

0 comments on commit 04d7f7d

Please sign in to comment.