Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added Vietnamese translations #264

Merged
merged 1 commit into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
46 changes: 23 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ A [Telegram bot](https://core.telegram.org/bots/api) that integrates with OpenAI
- [x] (NEW!) GPT-4 support
- If you have access to the GPT-4 API, simply change the `OPENAI_MODEL` parameter to `gpt-4`
- [x] (NEW!) Localized bot language
- Available languages :gb: :de: :ru: :tr: :it: :es: :indonesia: :netherlands: :cn:
- Available languages :gb: :de: :ru: :tr: :it: :es: :indonesia: :netherlands: :cn: :vietnam:
- [x] (NEW!) Improved inline queries support for group and private chats - by [@bugfloyd](https://github.com/bugfloyd)
- To use this feature, enable inline queries for your bot in BotFather via the `/setinline` [command](https://core.telegram.org/bots/inline)

Expand Down Expand Up @@ -68,28 +68,28 @@ The following parameters are optional and can be set in the `.env` file:
Check out the [Budget Manual](https://github.com/n3d1117/chatgpt-telegram-bot/discussions/184) for possible budget configurations.

#### Additional optional configuration options
| Parameter | Description | Default value |
|------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| `ENABLE_QUOTING` | Whether to enable message quoting in private chats | `true` |
| `ENABLE_IMAGE_GENERATION` | Whether to enable image generation via the `/image` command | `true` |
| `ENABLE_TRANSCRIPTION` | Whether to enable transcriptions of audio and video messages | `true` |
| `PROXY` | Proxy to be used for OpenAI and Telegram bot (e.g. `http://localhost:8080`) | - |
| `OPENAI_MODEL` | The OpenAI model to use for generating responses | `gpt-3.5-turbo` |
| `ASSISTANT_PROMPT` | A system message that sets the tone and controls the behavior of the assistant | `You are a helpful assistant.` |
| `SHOW_USAGE` | Whether to show OpenAI token usage information after each response | `false` |
| `STREAM` | Whether to stream responses. **Note**: incompatible, if enabled, with `N_CHOICES` higher than 1 | `true` |
| `MAX_TOKENS` | Upper bound on how many tokens the ChatGPT API will return | `1200` for GPT-3, `2400` for GPT-4 |
| `MAX_HISTORY_SIZE` | Max number of messages to keep in memory, after which the conversation will be summarised to avoid excessive token usage | `15` |
| `MAX_CONVERSATION_AGE_MINUTES` | Maximum number of minutes a conversation should live since the last message, after which the conversation will be reset | `180` |
| `VOICE_REPLY_WITH_TRANSCRIPT_ONLY` | Whether to answer to voice messages with the transcript only or with a ChatGPT response of the transcript | `false` |
| `N_CHOICES` | Number of answers to generate for each input message. **Note**: setting this to a number higher than 1 will not work properly if `STREAM` is enabled | `1` |
| `TEMPERATURE` | Number between 0 and 2. Higher values will make the output more random | `1.0` |
| `PRESENCE_PENALTY` | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far | `0.0` |
| `FREQUENCY_PENALTY` | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far | `0.0` |
| `IMAGE_SIZE` | The DALL·E generated image size. Allowed values: `256x256`, `512x512` or `1024x1024` | `512x512` |
| `GROUP_TRIGGER_KEYWORD` | If set, the bot in group chats will only respond to messages that start with this keyword | - |
| `IGNORE_GROUP_TRANSCRIPTIONS` | If set to true, the bot will not process transcriptions in group chats | `true` |
| `BOT_LANGUAGE` | Language of general bot messages. Currently available: `en`, `de`, `ru`, `tr`, `it`, `es`, `id`, `nl`, `cn`. [Contribute with additional translations](https://github.com/n3d1117/chatgpt-telegram-bot/discussions/219) | `en` |
| Parameter | Description | Default value |
|------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------|
| `ENABLE_QUOTING` | Whether to enable message quoting in private chats | `true` |
| `ENABLE_IMAGE_GENERATION` | Whether to enable image generation via the `/image` command | `true` |
| `ENABLE_TRANSCRIPTION` | Whether to enable transcriptions of audio and video messages | `true` |
| `PROXY` | Proxy to be used for OpenAI and Telegram bot (e.g. `http://localhost:8080`) | - |
| `OPENAI_MODEL` | The OpenAI model to use for generating responses | `gpt-3.5-turbo` |
| `ASSISTANT_PROMPT` | A system message that sets the tone and controls the behavior of the assistant | `You are a helpful assistant.` |
| `SHOW_USAGE` | Whether to show OpenAI token usage information after each response | `false` |
| `STREAM` | Whether to stream responses. **Note**: incompatible, if enabled, with `N_CHOICES` higher than 1 | `true` |
| `MAX_TOKENS` | Upper bound on how many tokens the ChatGPT API will return | `1200` for GPT-3, `2400` for GPT-4 |
| `MAX_HISTORY_SIZE` | Max number of messages to keep in memory, after which the conversation will be summarised to avoid excessive token usage | `15` |
| `MAX_CONVERSATION_AGE_MINUTES` | Maximum number of minutes a conversation should live since the last message, after which the conversation will be reset | `180` |
| `VOICE_REPLY_WITH_TRANSCRIPT_ONLY` | Whether to answer to voice messages with the transcript only or with a ChatGPT response of the transcript | `false` |
| `N_CHOICES` | Number of answers to generate for each input message. **Note**: setting this to a number higher than 1 will not work properly if `STREAM` is enabled | `1` |
| `TEMPERATURE` | Number between 0 and 2. Higher values will make the output more random | `1.0` |
| `PRESENCE_PENALTY` | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far | `0.0` |
| `FREQUENCY_PENALTY` | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far | `0.0` |
| `IMAGE_SIZE` | The DALL·E generated image size. Allowed values: `256x256`, `512x512` or `1024x1024` | `512x512` |
| `GROUP_TRIGGER_KEYWORD` | If set, the bot in group chats will only respond to messages that start with this keyword | - |
| `IGNORE_GROUP_TRANSCRIPTIONS` | If set to true, the bot will not process transcriptions in group chats | `true` |
| `BOT_LANGUAGE` | Language of general bot messages. Currently available: `en`, `de`, `ru`, `tr`, `it`, `es`, `id`, `nl`, `cn`, `vi`. [Contribute with additional translations](https://github.com/n3d1117/chatgpt-telegram-bot/discussions/219) | `en` |

Check out the [official API reference](https://platform.openai.com/docs/api-reference/chat) for more details.

Expand Down
42 changes: 42 additions & 0 deletions translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -376,5 +376,47 @@
"answer_with_chatgpt":"使用ChatGPT回答",
"ask_chatgpt":"询问ChatGPT",
"loading":"载入中..."
},
"vi": {
"help_description":"Hiển thị trợ giúp",
"reset_description":"Đặt lại cuộc trò chuyện. Tùy ý chuyển hướng dẫn cấp cao (ví dụ: /reset Bạn là một trợ lý hữu ích)",
"image_description":"Tạo hình ảnh từ câu lệnh (ví dụ: /image cat)",
"stats_description":"Nhận số liệu thống kê sử dụng hiện tại của bạn",
"resend_description":"Gửi lại tin nhắn mới nhất",
"chat_description":"Trò chuyện với bot!",
"disallowed":"Xin lỗi, bạn không được phép sử dụng bot này. Bạn có thể kiểm tra mã nguồn tại https://github.com/n3d1117/chatgpt-telegram-bot",
"budget_limit":"Rất tiếc, bạn đã đạt đến giới hạn sử dụng.",
"help_text":["Tôi là bot ChatGPT, hãy nói chuyện với tôi!", "Hãy gửi cho tôi một tin nhắn thoại hoặc tệp và tôi sẽ phiên âm nó cho bạn", "Mã nguồn mở tại https://github.com/n3d1117/chatgpt-telegram-bot"],
"stats_conversation":["Cuộc trò chuyện hiện tại", "tin nhắn trò chuyện trong lịch sử", "thông báo trò chuyện trong lịch sử"],
"usage_today":"Sử dụng ngày hôm nay",
"usage_month":"Sử dụng trong tháng này",
"stats_tokens":"mã thông báo trò chuyện được sử dụng",
"stats_images":"hình ảnh tạo ra",
"stats_transcribe":["phút và", "giây"],
"stats_total":"💰 Với tổng số tiền $",
"stats_budget":"Ngân sách còn lại của bạn",
"monthly":" cho tháng này",
"daily":" cho hôm nay",
"all-time":"",
"stats_openai":"Tháng này, tài khoản OpenAI của bạn đã bị tính phí $",
"resend_failed":"Bạn không có gì để gửi lại",
"reset_done":"Xong!",
"image_no_prompt":"Vui lòng cung cấp lời nhắc! (ví dụ: /image con mèo",
"image_fail":"Không thể tạo hình ảnh",
"media_download_fail":["Không thể tải xuống tệp âm thanh", "Đảm bảo tệp không quá lớn. (tối đa 20 MB)"],
"media_type_fail":"Loại tập tin không được hỗ trợ",
"transcript":"Dịch",
"answer":"Trả lời",
"transcribe_fail":"Không thể sao chép văn bản",
"chat_fail":"Không nhận được phản hồi",
"prompt":"Lời nhắc",
"completion":"hoàn thành",
"openai_rate_limit":"Đã vượt quá giới hạn tỷ lệ OpenAI",
"openai_invalid":"OpenAI Yêu cầu không hợp lệ",
"error":"Một lỗi đã xảy ra",
"try_again":"Vui lòng thử lại sau một lúc",
"answer_with_chatgpt":"Trả lời với ChatGPT",
"ask_chatgpt":"Hỏi ChatGPT",
"loading":"Đang tải..."
}
}