mirror of
https://github.com/aljazceru/chatgpt-telegram-bot.git
synced 2025-12-20 06:05:12 +01:00
added german and russian translations for bot msgs
This commit is contained in:
@@ -72,6 +72,7 @@ def main():
|
|||||||
'token_price': float(os.environ.get('TOKEN_PRICE', 0.002)),
|
'token_price': float(os.environ.get('TOKEN_PRICE', 0.002)),
|
||||||
'image_prices': [float(i) for i in os.environ.get('IMAGE_PRICES',"0.016,0.018,0.02").split(",")],
|
'image_prices': [float(i) for i in os.environ.get('IMAGE_PRICES',"0.016,0.018,0.02").split(",")],
|
||||||
'transcription_price': float(os.environ.get('TOKEN_PRICE', 0.006)),
|
'transcription_price': float(os.environ.get('TOKEN_PRICE', 0.006)),
|
||||||
|
'languague': os.environ.get('LANGUAGUE', 'en')
|
||||||
}
|
}
|
||||||
|
|
||||||
# Setup and run ChatGPT and Telegram bot
|
# Setup and run ChatGPT and Telegram bot
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import logging
|
|||||||
import os
|
import os
|
||||||
import itertools
|
import itertools
|
||||||
import asyncio
|
import asyncio
|
||||||
|
import json
|
||||||
|
|
||||||
import telegram
|
import telegram
|
||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
@@ -16,6 +17,25 @@ from pydub import AudioSegment
|
|||||||
from openai_helper import OpenAIHelper
|
from openai_helper import OpenAIHelper
|
||||||
from usage_tracker import UsageTracker
|
from usage_tracker import UsageTracker
|
||||||
|
|
||||||
|
with open('translations.json', 'r', encoding='utf-8') as f:
|
||||||
|
translations = json.load(f)
|
||||||
|
|
||||||
|
def localized_text(key, languague):
|
||||||
|
"""
|
||||||
|
Return translated text for a key in specified languague.
|
||||||
|
Keys and translations can be found in the translations.json.
|
||||||
|
"""
|
||||||
|
try:
|
||||||
|
return translations[languague][key]
|
||||||
|
except KeyError:
|
||||||
|
logging.warning(f"No translation available for languague code '{languague}' and key '{key}'")
|
||||||
|
# Fallback to English if the translation is not available
|
||||||
|
if key in translations['en']:
|
||||||
|
return translations['en'][key]
|
||||||
|
else:
|
||||||
|
logging.warning(f"No english definition found for key '{key}' in translations.json")
|
||||||
|
# return key as text
|
||||||
|
return key
|
||||||
|
|
||||||
def message_text(message: Message) -> str:
|
def message_text(message: Message) -> str:
|
||||||
"""
|
"""
|
||||||
@@ -30,7 +50,6 @@ def message_text(message: Message) -> str:
|
|||||||
|
|
||||||
return message_text if len(message_text) > 0 else ''
|
return message_text if len(message_text) > 0 else ''
|
||||||
|
|
||||||
|
|
||||||
class ChatGPTTelegramBot:
|
class ChatGPTTelegramBot:
|
||||||
"""
|
"""
|
||||||
Class representing a ChatGPT Telegram Bot.
|
Class representing a ChatGPT Telegram Bot.
|
||||||
@@ -41,12 +60,6 @@ class ChatGPTTelegramBot:
|
|||||||
"daily":"cost_today",
|
"daily":"cost_today",
|
||||||
"all-time":"cost_all_time"
|
"all-time":"cost_all_time"
|
||||||
}
|
}
|
||||||
# Mapping of budget period to a print output
|
|
||||||
budget_print_map = {
|
|
||||||
"monthly": " this month",
|
|
||||||
"daily": " today",
|
|
||||||
"all-time": ""
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(self, config: dict, openai: OpenAIHelper):
|
def __init__(self, config: dict, openai: OpenAIHelper):
|
||||||
"""
|
"""
|
||||||
@@ -56,20 +69,19 @@ class ChatGPTTelegramBot:
|
|||||||
"""
|
"""
|
||||||
self.config = config
|
self.config = config
|
||||||
self.openai = openai
|
self.openai = openai
|
||||||
|
languague = self.config['languague']
|
||||||
self.commands = [
|
self.commands = [
|
||||||
BotCommand(command='help', description='Show help message'),
|
BotCommand(command='help', description=localized_text('help_description', languague)),
|
||||||
BotCommand(command='reset', description='Reset the conversation. Optionally pass high-level instructions '
|
BotCommand(command='reset', description=localized_text('reset_description', languague)),
|
||||||
'(e.g. /reset You are a helpful assistant)'),
|
BotCommand(command='image', description=localized_text('image_description', languague)),
|
||||||
BotCommand(command='image', description='Generate image from prompt (e.g. /image cat)'),
|
BotCommand(command='stats', description=localized_text('stats_description', languague)),
|
||||||
BotCommand(command='stats', description='Get your current usage statistics'),
|
BotCommand(command='resend', description=localized_text('resend_description', languague))
|
||||||
BotCommand(command='resend', description='Resend the latest message')
|
|
||||||
]
|
]
|
||||||
self.group_commands = [
|
self.group_commands = [
|
||||||
BotCommand(command='chat', description='Chat with the bot!')
|
BotCommand(command='chat', description=localized_text('chat_description', languague))
|
||||||
] + self.commands
|
] + self.commands
|
||||||
self.disallowed_message = "Sorry, you are not allowed to use this bot. You can check out the source code at " \
|
self.disallowed_message = localized_text('disallowed', languague)
|
||||||
"https://github.com/n3d1117/chatgpt-telegram-bot"
|
self.budget_limit_message = localized_text('budget_limit', languague)
|
||||||
self.budget_limit_message = f"Sorry, you have reached your usage limit{self.budget_print_map[config['budget_period']]}."
|
|
||||||
self.usage = {}
|
self.usage = {}
|
||||||
self.last_message = {}
|
self.last_message = {}
|
||||||
|
|
||||||
@@ -79,13 +91,16 @@ class ChatGPTTelegramBot:
|
|||||||
"""
|
"""
|
||||||
commands = self.group_commands if self.is_group_chat(update) else self.commands
|
commands = self.group_commands if self.is_group_chat(update) else self.commands
|
||||||
commands_description = [f'/{command.command} - {command.description}' for command in commands]
|
commands_description = [f'/{command.command} - {command.description}' for command in commands]
|
||||||
help_text = 'I\'m a ChatGPT bot, talk to me!' + \
|
languague = self.config['languague']
|
||||||
'\n\n' + \
|
help_text = (
|
||||||
'\n'.join(commands_description) + \
|
localized_text('help_text', languague)[0] +
|
||||||
'\n\n' + \
|
'\n\n' +
|
||||||
'Send me a voice message or file and I\'ll transcribe it for you!' + \
|
'\n'.join(commands_description) +
|
||||||
'\n\n' + \
|
'\n\n' +
|
||||||
"Open source at https://github.com/n3d1117/chatgpt-telegram-bot"
|
localized_text('help_text', languague)[1] +
|
||||||
|
'\n\n' +
|
||||||
|
localized_text('help_text', languague)[2]
|
||||||
|
)
|
||||||
await update.message.reply_text(help_text, disable_web_page_preview=True)
|
await update.message.reply_text(help_text, disable_web_page_preview=True)
|
||||||
|
|
||||||
|
|
||||||
@@ -115,30 +130,38 @@ class ChatGPTTelegramBot:
|
|||||||
chat_id = update.effective_chat.id
|
chat_id = update.effective_chat.id
|
||||||
chat_messages, chat_token_length = self.openai.get_conversation_stats(chat_id)
|
chat_messages, chat_token_length = self.openai.get_conversation_stats(chat_id)
|
||||||
remaining_budget = self.get_remaining_budget(update)
|
remaining_budget = self.get_remaining_budget(update)
|
||||||
|
languague = self.config['languague']
|
||||||
text_current_conversation = f"*Current conversation:*\n"+\
|
text_current_conversation = (
|
||||||
f"{chat_messages} chat messages in history.\n"+\
|
f"*{localized_text('stats_conversation', languague)[0]}*:\n"
|
||||||
f"{chat_token_length} chat tokens in history.\n"+\
|
f"{chat_messages} {localized_text('stats_conversation', languague)[1]}.\n"
|
||||||
f"----------------------------\n"
|
f"{chat_token_length} {localized_text('stats_conversation', languague)[2]}.\n"
|
||||||
text_today = f"*Usage today:*\n"+\
|
f"----------------------------\n"
|
||||||
f"{tokens_today} chat tokens used.\n"+\
|
)
|
||||||
f"{images_today} images generated.\n"+\
|
text_today = (
|
||||||
f"{transcribe_minutes_today} minutes and {transcribe_seconds_today} seconds transcribed.\n"+\
|
f"*{localized_text('usage_today', languague)}*\n"
|
||||||
f"💰 For a total amount of ${current_cost['cost_today']:.2f}\n"+\
|
f"{tokens_today} {localized_text('stats_tokens', languague)}\n"
|
||||||
f"----------------------------\n"
|
f"{images_today} {localized_text('stats_images', languague)}\n"
|
||||||
text_month = f"*Usage this month:*\n"+\
|
f"{transcribe_minutes_today} {localized_text('stats_transcribe', languague)[0]} "
|
||||||
f"{tokens_month} chat tokens used.\n"+\
|
f"{transcribe_seconds_today} {localized_text('stats_transcribe', languague)[1]}\n"
|
||||||
f"{images_month} images generated.\n"+\
|
f"{localized_text('stats_total', languague)}{current_cost['cost_today']:.2f}\n"
|
||||||
f"{transcribe_minutes_month} minutes and {transcribe_seconds_month} seconds transcribed.\n"+\
|
f"----------------------------\n"
|
||||||
f"💰 For a total amount of ${current_cost['cost_month']:.2f}"
|
)
|
||||||
|
text_month = (
|
||||||
|
f"*{localized_text('usage_month', languague)}*\n"
|
||||||
|
f"{tokens_month} {localized_text('stats_tokens', languague)}\n"
|
||||||
|
f"{images_month} {localized_text('stats_images', languague)}\n"
|
||||||
|
f"{transcribe_minutes_month} {localized_text('stats_transcribe', languague)[0]} "
|
||||||
|
f"{transcribe_seconds_month} {localized_text('stats_transcribe', languague)[1]}\n"
|
||||||
|
f"{localized_text('stats_total', languague)}{current_cost['cost_month']:.2f}"
|
||||||
|
)
|
||||||
# text_budget filled with conditional content
|
# text_budget filled with conditional content
|
||||||
text_budget = "\n\n"
|
text_budget = "\n\n"
|
||||||
budget_period =self.config['budget_period']
|
budget_period =self.config['budget_period']
|
||||||
if remaining_budget < float('inf'):
|
if remaining_budget < float('inf'):
|
||||||
text_budget += f"You have a remaining budget of ${remaining_budget:.2f}{self.budget_print_map[budget_period]}.\n"
|
text_budget += f"{localized_text('stats_budget', languague)} {localized_text(budget_period, languague)}: ${remaining_budget:.2f}.\n"
|
||||||
# add OpenAI account information for admin request
|
# add OpenAI account information for admin request
|
||||||
if self.is_admin(update):
|
if self.is_admin(update):
|
||||||
text_budget += f"Your OpenAI account was billed ${self.openai.get_billing_current_month():.2f} this month."
|
text_budget += f"{localized_text('stats_openai', languague)}{self.openai.get_billing_current_month():.2f}."
|
||||||
|
|
||||||
usage_text = text_current_conversation + text_today + text_month + text_budget
|
usage_text = text_current_conversation + text_today + text_month + text_budget
|
||||||
await update.message.reply_text(usage_text, parse_mode=constants.ParseMode.MARKDOWN)
|
await update.message.reply_text(usage_text, parse_mode=constants.ParseMode.MARKDOWN)
|
||||||
@@ -157,7 +180,7 @@ class ChatGPTTelegramBot:
|
|||||||
if chat_id not in self.last_message:
|
if chat_id not in self.last_message:
|
||||||
logging.warning(f'User {update.message.from_user.name} (id: {update.message.from_user.id})'
|
logging.warning(f'User {update.message.from_user.name} (id: {update.message.from_user.id})'
|
||||||
f' does not have anything to resend')
|
f' does not have anything to resend')
|
||||||
await context.bot.send_message(chat_id=chat_id, text="You have nothing to resend")
|
await context.bot.send_message(chat_id=chat_id, text=localized_text('resend_failed', self.config['languague']))
|
||||||
return
|
return
|
||||||
|
|
||||||
# Update message text, clear self.last_message and send the request to prompt
|
# Update message text, clear self.last_message and send the request to prompt
|
||||||
@@ -184,7 +207,7 @@ class ChatGPTTelegramBot:
|
|||||||
chat_id = update.effective_chat.id
|
chat_id = update.effective_chat.id
|
||||||
reset_content = message_text(update.message)
|
reset_content = message_text(update.message)
|
||||||
self.openai.reset_chat_history(chat_id=chat_id, content=reset_content)
|
self.openai.reset_chat_history(chat_id=chat_id, content=reset_content)
|
||||||
await context.bot.send_message(chat_id=chat_id, text='Done!')
|
await context.bot.send_message(chat_id=chat_id, text=localized_text('reset_done', self.config['languague']))
|
||||||
|
|
||||||
async def image(self, update: Update, context: ContextTypes.DEFAULT_TYPE):
|
async def image(self, update: Update, context: ContextTypes.DEFAULT_TYPE):
|
||||||
"""
|
"""
|
||||||
@@ -196,7 +219,7 @@ class ChatGPTTelegramBot:
|
|||||||
chat_id = update.effective_chat.id
|
chat_id = update.effective_chat.id
|
||||||
image_query = message_text(update.message)
|
image_query = message_text(update.message)
|
||||||
if image_query == '':
|
if image_query == '':
|
||||||
await context.bot.send_message(chat_id=chat_id, text='Please provide a prompt! (e.g. /image cat)')
|
await context.bot.send_message(chat_id=chat_id, text=localized_text('image_no_prompt', self.config['languague']))
|
||||||
return
|
return
|
||||||
|
|
||||||
logging.info(f'New image generation request received from user {update.message.from_user.name} '
|
logging.info(f'New image generation request received from user {update.message.from_user.name} '
|
||||||
@@ -222,7 +245,7 @@ class ChatGPTTelegramBot:
|
|||||||
await context.bot.send_message(
|
await context.bot.send_message(
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
reply_to_message_id=self.get_reply_to_message_id(update),
|
reply_to_message_id=self.get_reply_to_message_id(update),
|
||||||
text=f'Failed to generate image: {str(e)}',
|
text=f"{localized_text('image_no_prompt', self.config['languague'])}: {str(e)}",
|
||||||
parse_mode=constants.ParseMode.MARKDOWN
|
parse_mode=constants.ParseMode.MARKDOWN
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -244,7 +267,7 @@ class ChatGPTTelegramBot:
|
|||||||
|
|
||||||
async def _execute():
|
async def _execute():
|
||||||
filename_mp3 = f'{filename}.mp3'
|
filename_mp3 = f'{filename}.mp3'
|
||||||
|
languague = self.config['languague']
|
||||||
try:
|
try:
|
||||||
media_file = await context.bot.get_file(update.message.effective_attachment.file_id)
|
media_file = await context.bot.get_file(update.message.effective_attachment.file_id)
|
||||||
await media_file.download_to_drive(filename)
|
await media_file.download_to_drive(filename)
|
||||||
@@ -253,7 +276,7 @@ class ChatGPTTelegramBot:
|
|||||||
await context.bot.send_message(
|
await context.bot.send_message(
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
reply_to_message_id=self.get_reply_to_message_id(update),
|
reply_to_message_id=self.get_reply_to_message_id(update),
|
||||||
text=f'Failed to download audio file: {str(e)}. Make sure the file is not too large. (max 20MB)',
|
text=f"{localized_text('media_download_fail', languague)[0]}: {str(e)}. {localized_text('media_download_fail', languague)[1]}",
|
||||||
parse_mode=constants.ParseMode.MARKDOWN
|
parse_mode=constants.ParseMode.MARKDOWN
|
||||||
)
|
)
|
||||||
return
|
return
|
||||||
@@ -270,7 +293,7 @@ class ChatGPTTelegramBot:
|
|||||||
await context.bot.send_message(
|
await context.bot.send_message(
|
||||||
chat_id=update.effective_chat.id,
|
chat_id=update.effective_chat.id,
|
||||||
reply_to_message_id=self.get_reply_to_message_id(update),
|
reply_to_message_id=self.get_reply_to_message_id(update),
|
||||||
text='Unsupported file type'
|
text=localized_text('media_type_fail', languague)
|
||||||
)
|
)
|
||||||
if os.path.exists(filename):
|
if os.path.exists(filename):
|
||||||
os.remove(filename)
|
os.remove(filename)
|
||||||
@@ -298,7 +321,7 @@ class ChatGPTTelegramBot:
|
|||||||
if self.config['voice_reply_transcript']:
|
if self.config['voice_reply_transcript']:
|
||||||
|
|
||||||
# Split into chunks of 4096 characters (Telegram's message limit)
|
# Split into chunks of 4096 characters (Telegram's message limit)
|
||||||
transcript_output = f'_Transcript:_\n"{transcript}"'
|
transcript_output = f"_{localized_text('transcript', languague)}:_\n\"{transcript}\""
|
||||||
chunks = self.split_into_chunks(transcript_output)
|
chunks = self.split_into_chunks(transcript_output)
|
||||||
|
|
||||||
for index, transcript_chunk in enumerate(chunks):
|
for index, transcript_chunk in enumerate(chunks):
|
||||||
@@ -319,7 +342,7 @@ class ChatGPTTelegramBot:
|
|||||||
self.usage["guests"].add_chat_tokens(total_tokens, self.config['token_price'])
|
self.usage["guests"].add_chat_tokens(total_tokens, self.config['token_price'])
|
||||||
|
|
||||||
# Split into chunks of 4096 characters (Telegram's message limit)
|
# Split into chunks of 4096 characters (Telegram's message limit)
|
||||||
transcript_output = f'_Transcript:_\n"{transcript}"\n\n_Answer:_\n{response}'
|
transcript_output = f"_{localized_text('transcript', languague)}:_\n\"{transcript}\"\n\n_{localized_text('answer', languague)}:_\n{response}"
|
||||||
chunks = self.split_into_chunks(transcript_output)
|
chunks = self.split_into_chunks(transcript_output)
|
||||||
|
|
||||||
for index, transcript_chunk in enumerate(chunks):
|
for index, transcript_chunk in enumerate(chunks):
|
||||||
@@ -335,7 +358,7 @@ class ChatGPTTelegramBot:
|
|||||||
await context.bot.send_message(
|
await context.bot.send_message(
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
reply_to_message_id=self.get_reply_to_message_id(update),
|
reply_to_message_id=self.get_reply_to_message_id(update),
|
||||||
text=f'Failed to transcribe text: {str(e)}',
|
text=f"{localized_text('transcribe_fail', languague)}: {str(e)}",
|
||||||
parse_mode=constants.ParseMode.MARKDOWN
|
parse_mode=constants.ParseMode.MARKDOWN
|
||||||
)
|
)
|
||||||
finally:
|
finally:
|
||||||
@@ -496,7 +519,7 @@ class ChatGPTTelegramBot:
|
|||||||
await context.bot.send_message(
|
await context.bot.send_message(
|
||||||
chat_id=chat_id,
|
chat_id=chat_id,
|
||||||
reply_to_message_id=self.get_reply_to_message_id(update),
|
reply_to_message_id=self.get_reply_to_message_id(update),
|
||||||
text=f'Failed to get response: {str(e)}',
|
text=f"{localized_text('chat_fail', self.config['languague'])} {str(e)}",
|
||||||
parse_mode=constants.ParseMode.MARKDOWN
|
parse_mode=constants.ParseMode.MARKDOWN
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
101
translations.json
Normal file
101
translations.json
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
{
|
||||||
|
"en": {
|
||||||
|
"help_description":"Show help message",
|
||||||
|
"reset_description":"Reset the conversation. Optionally pass high-level instructions (e.g. /reset You are a helpful assistant)",
|
||||||
|
"image_description":"Generate image from prompt (e.g. /image cat)",
|
||||||
|
"stats_description":"Get your current usage statistics",
|
||||||
|
"resend_description":"Resend the latest massage",
|
||||||
|
"chat_description":"Chat with the bot!",
|
||||||
|
"disallowed":"Sorry, you are not allowed to use this bot. You can check out the source code at https://github.com/n3d1117/chatgpt-telegram-bot",
|
||||||
|
"budget_limit":"Sorry, you have reached your usage limit.",
|
||||||
|
"help_text":["I'm a ChatGPT bot, talk to me!", "Send me a voice message or file and I'll transcribe it for you", "Open source at https://github.com/n3d1117/chatgpt-telegram-bot"],
|
||||||
|
"stats_conversation":["Current conversation", "chat messages in history", "chat tokens in history"],
|
||||||
|
"usage_today":"Usage today:",
|
||||||
|
"usage_month":"Usage this month:",
|
||||||
|
"stats_tokens":"chat tokens used.",
|
||||||
|
"stats_images":"images generated.",
|
||||||
|
"stats_transcribe":["minutes and", "seconds transcribed."],
|
||||||
|
"stats_total":"💰 For a total amount of $",
|
||||||
|
"stats_budget":"Your remaining budget for",
|
||||||
|
"monthly":"this month",
|
||||||
|
"daily":"today",
|
||||||
|
"all-time":"",
|
||||||
|
"stats_openai":"This month your OpenAI account was billed $",
|
||||||
|
"resend_failed":"You have nothing to resend",
|
||||||
|
"reset_done":"Done!",
|
||||||
|
"image_no_prompt":"Please provide a prompt! (e.g. /image cat)",
|
||||||
|
"image_fail":"Failed to generate image",
|
||||||
|
"media_download_fail":["Failed to download audio file", "Make sure the file is not too large. (max 20MB)"],
|
||||||
|
"media_type_fail":"Unsupported file type",
|
||||||
|
"transcript":"Transcript",
|
||||||
|
"answer":"Answer",
|
||||||
|
"transcribe_fail":"Failed to transcribe text",
|
||||||
|
"chat_fail":"Failed to get response"
|
||||||
|
},
|
||||||
|
"de": {
|
||||||
|
"help_description":"Zeige die Hilfenachricht",
|
||||||
|
"reset_description":"Setze die Konversation zurück. Optionale Eingabe einer grundlegenden Anweisung (z.B. /reset Du bist ein hilfreicher Assistent)",
|
||||||
|
"image_description":"Erzeuge ein Bild aus einer Aufforderung (z.B. /image Katze)",
|
||||||
|
"stats_description":"Zeige aktuelle Benutzungstatistiken",
|
||||||
|
"resend_description":"Wiederhole das Senden der letzten Nachricht",
|
||||||
|
"chat_description":"Schreibe mit dem Bot!",
|
||||||
|
"disallowed":"Sorry, du darfst diesen Bot nicht verwenden. Den Quellcode findest du hier https://github.com/n3d1117/chatgpt-telegram-bot",
|
||||||
|
"budget_limit":"Sorry, du hast dein Benutzungslimit erreicht",
|
||||||
|
"help_text":["Ich bin ein ChatGPT Bot, rede mit mir!", "Sende eine Sprachnachricht oder Datei und ich fertige dir eine Abschrift an", "Quelloffener Code unter https://github.com/n3d1117/chatgpt-telegram-bot"],
|
||||||
|
"stats_conversation":["Aktuelle Konversation", "Nachrichten im Verlauf", "Chat Tokens im Verlauf"],
|
||||||
|
"usage_today":"Nutzung heute:",
|
||||||
|
"usage_month":"Nutzung diesen Monat:",
|
||||||
|
"stats_tokens":"Chat Tokens verwendet.",
|
||||||
|
"stats_images":"Bilder generiert.",
|
||||||
|
"stats_transcribe":["Minuten und", "Sekunden abgeschrieben."],
|
||||||
|
"stats_total":"💰 Für einem Gesamtbetrag von $",
|
||||||
|
"stats_budget":"Dein verbliebenes Budget für",
|
||||||
|
"monthly":"diesen Monat",
|
||||||
|
"daily":"heute",
|
||||||
|
"all-time":"",
|
||||||
|
"stats_openai":"Deine OpenAI Rechnung für den aktuellen Monat beträgt $",
|
||||||
|
"resend_failed":"Es gibt keine Nachricht zum wiederholten Senden",
|
||||||
|
"reset_done":"Fertig!",
|
||||||
|
"image_no_prompt":"Bitte füge eine Aufforderung hinzu (z.B. /image Katze)",
|
||||||
|
"image_fail":"Fehler beim Generieren eines Bildes",
|
||||||
|
"media_download_fail":["Fehler beim Herunterladen der Audiodatei", "Die Datei könnte zu groß sein. (max 20MB)"],
|
||||||
|
"media_type_fail":"Dateityp nicht unterstützt",
|
||||||
|
"transcript_title":"Abschrift",
|
||||||
|
"answer_title":"Antwort",
|
||||||
|
"transcribe_fail":"Fehler bei der Abschrift",
|
||||||
|
"chat_fail":"Fehler beim Erhalt der Antwort"
|
||||||
|
},
|
||||||
|
"ru": {
|
||||||
|
"help_description":"Показать справочное сообщение",
|
||||||
|
"reset_description":"Перезагрузить разговор. По желанию передай общие инструкции (например, /reset ты полезный помощник)",
|
||||||
|
"image_description":"Создать изображение по запросу (например, /image кошка)",
|
||||||
|
"stats_description":"Получить статистику использования",
|
||||||
|
"resend_description":"Повторная отправка последнего сообщения",
|
||||||
|
"chat_description":"Общайся с ботом!",
|
||||||
|
"disallowed":"Извини, тебе запрещено использовать этого бота. Исходный код можно найти здесь https://github.com/n3d1117/chatgpt-telegram-bot",
|
||||||
|
"budget_limit":"Извини, ты достиг предела использования.",
|
||||||
|
"help_text":["Я бот ChatGPT, поговори со мной!", "Пришли мне голосовое сообщение или файл, и я сделаю тебе расшифровку.", "Открытый исходный код на https://github.com/n3d1117/chatgpt-telegram-bot"],
|
||||||
|
"stats_conversation":["Текущий разговор", "сообщения в истории", "токены чата в истории"],
|
||||||
|
"usage_today":"Использование сегодня:",
|
||||||
|
"usage_month":"Использование в этом месяце:",
|
||||||
|
"stats_tokens":"токенов чата использовано.",
|
||||||
|
"stats_images":"изображений создано.",
|
||||||
|
"stats_transcribe":["минут(ы) и", "секунд(ы) расшифровки."],
|
||||||
|
"stats_total":"💰 На общую сумму $",
|
||||||
|
"stats_budget":"Остаточный бюджет на",
|
||||||
|
"monthly":"этот месяц",
|
||||||
|
"daily":"сегодня",
|
||||||
|
"all-time":"",
|
||||||
|
"stats_openai":"В этом месяце на ваш аккаунт OpenAI был выставлен счет на $",
|
||||||
|
"resend_failed":"Вам нечего пересылать",
|
||||||
|
"reset_done":"Готово!",
|
||||||
|
"image_no_prompt":"Пожалуйста, подайте запрос! (например, /image кошка)",
|
||||||
|
"image_fail":"Не удалось создать изображение",
|
||||||
|
"media_download_fail":["Не удалось загрузить аудиофайл", "Проверьте, чтобы файл не был слишком большим. (не более 20 МБ)"],
|
||||||
|
"media_type_fail":"Неподдержанный тип файла",
|
||||||
|
"transcript":"Расшифровка",
|
||||||
|
"answer":"Ответ",
|
||||||
|
"transcribe_fail":"Не удалось расшифровать текст",
|
||||||
|
"chat_fail":"Не удалось получить ответ"
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user