Skip to content

Commit

Permalink
update suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
fegloff committed Feb 22, 2024
1 parent 0f0c0fc commit 015525e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/modules/llms/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export enum SupportedCommands {

export const MAX_TRIES = 3
const LLAMA_PREFIX_LIST = ['* ']
const BARD_PREFIX_LIST = ['b.', 'B.']
const BARD_PREFIX_LIST = ['b. ', 'B. ']

export const isMentioned = (
ctx: OnMessageContext | OnCallBackQueryData
Expand Down
6 changes: 3 additions & 3 deletions src/modules/open-ai/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ export enum SupportedCommands {

export const MAX_TRIES = 3

export const DALLE_PREFIX_LIST = ['i.', ', ', 'd.']
export const CHAT_GPT_PREFIX_LIST = ['a.', '. ']
export const NEW_PREFIX_LIST = ['n.', '.. ']
export const DALLE_PREFIX_LIST = ['i. ', ', ', 'd. ']
export const CHAT_GPT_PREFIX_LIST = ['a. ', '. ']
export const NEW_PREFIX_LIST = ['n. ', '.. ']

export const isMentioned = (
ctx: OnMessageContext | OnCallBackQueryData
Expand Down
4 changes: 2 additions & 2 deletions src/modules/payment/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -555,9 +555,9 @@ export class BotPayments {
return true
} else {
if (ctx.chat?.id) {
await ctx.api.editMessageText(ctx.chat?.id, msgId, `Not enough balance. To recharge send ONE to \`${userAccount.address}\``, { parse_mode: 'Markdown' })
await ctx.api.editMessageText(ctx.chat?.id, msgId, `Insufficient ONE balance to cover gas fees. Please send 1 ONE to \`${userAccount.address}\` to cover gas fees`, { parse_mode: 'Markdown' })
} else {
await sendMessage(ctx, `Not enough balance. To recharge send ONE to \`${userAccount.address}\``, { parseMode: 'Markdown' })
await sendMessage(ctx, `Insufficient ONE balance to cover gas fees. Please send 1 ONE to \`${userAccount.address}\` to cover gas fees`, { parseMode: 'Markdown' })
}
}
return false
Expand Down
6 changes: 3 additions & 3 deletions src/modules/sd-images/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const removeSpaceFromBegin = (text: string): string => {
return text.slice(idx)
}

const SPECIAL_IMG_CMD_SYMBOLS = ['l.', '? ', '! ', ': ', '; ', 'r.', 'R.', '( ', '$ ', '& ', '< ']
const SPECIAL_IMG_CMD_SYMBOLS = ['l. ', '? ', '! ', ': ', '; ', 'r. ', 'R. ', '( ', '$ ', '& ', '< ']

export const getPrefix = (prompt: string, prefixList: string[]): string => {
for (let i = 0; i < prefixList.length; i++) {
Expand Down Expand Up @@ -182,12 +182,12 @@ export const parseCtx = (ctx: Context): IOperation | false => {
command = COMMAND.TEXT_TO_IMAGE
}

if (messageText.startsWith('l.') ?? messageText.startsWith('L.')) {
if (messageText.startsWith('l. ') ?? messageText.startsWith('L. ')) {
model = getModelByParam('xl')
lora = getLoraByParam('logo', model?.baseModel ?? 'SDXL 1.0')
}

if (messageText.startsWith('g.') || messageText.startsWith('G.')) {
if (messageText.startsWith('g. ') || messageText.startsWith('G. ')) {
command = COMMAND.TEXT_TO_IMAGE
format = MEDIA_FORMAT.GIF
model = getModelByParam('22')
Expand Down

0 comments on commit 015525e

Please sign in to comment.