mirror of
https://github.com/xxnuo/MTranServer.git
synced 2026-09-03 06:35:20 +08:00
docs: udpate
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
-host string 服务器监听地址 (默认 "0.0.0.0")
|
||||
-port string 服务器端口 (默认 "8989")
|
||||
-ui 启用 Web UI (默认 false)
|
||||
-offline 启用离线模式 (默认 false)
|
||||
-offline 启用离线模式,不自动下载新模型 (默认 false)
|
||||
-worker-idle-timeout int Worker 空闲超时时间(秒) (默认 300)
|
||||
|
||||
示例:
|
||||
@@ -58,7 +58,7 @@
|
||||
| MT_HOST | 服务器监听地址 | 0.0.0.0| 任意 IP 地址 |
|
||||
| MT_PORT | 服务器端口 | 8989 | 1-65535 |
|
||||
| MT_UI | 启用 Web UI | false | true, false |
|
||||
| MT_OFFLINE | 离线模式(不自动下载模型) | false | true, false |
|
||||
| MT_OFFLINE | 离线模式,不自动下载新语言的模型,仅使用已下载的模型 | false | true, false |
|
||||
| MT_WORKER_IDLE_TIMEOUT| Worker 空闲超时时间(秒) | 300 | 任意正整数 |
|
||||
| API_TOKEN | API 访问令牌 | 空 | 任意字符串 |
|
||||
| CORE_API_TOKEN | API 访问令牌(备选) | 空 | 任意字符串 |
|
||||
@@ -144,7 +144,9 @@ export MT_PORT=9000
|
||||
>
|
||||
> - [简约翻译](https://github.com/fishjar/kiss-translator) 在`设置`页面,接口设置中滚动到下面,即可看到自定义接口 `Custom`。同理,设置`最大请求并发数量`、`每次请求间隔时间`以充分发挥服务器性能。我设置的是`最大请求并发数量`为`100`,`每次请求间隔时间`为`1`。你可以根据自己服务器配置设置。
|
||||
>
|
||||
> 接下来按下表的设置方法设置插件的自定义接口地址。注意第一次请求会慢一些,因为需要加载模型。以后的请求会很快。
|
||||
> **重要提示:** 首次翻译某个语言对时,服务器会自动下载对应的翻译模型(除非启用了离线模式),这个过程可能需要等待一段时间(取决于网络速度和模型大小)。模型下载完成后,引擎启动也需要几秒钟时间。之后的翻译请求将享受毫秒级的响应速度。建议在正式使用前先测试一次翻译,让服务器预先下载和加载模型。
|
||||
>
|
||||
> 接下来按下表的设置方法设置插件的自定义接口地址。
|
||||
|
||||
| 名称 | URL | 插件设置 |
|
||||
| ---------------- | --------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
|
||||
@@ -43,7 +43,7 @@ Options:
|
||||
-host string Server host address (default "0.0.0.0")
|
||||
-port string Server port (default "8989")
|
||||
-ui Enable Web UI (default false)
|
||||
-offline Enable offline mode (default false)
|
||||
-offline Enable offline mode, disable automatic model download (default false)
|
||||
-worker-idle-timeout int Worker idle timeout in seconds (default 300)
|
||||
|
||||
Examples:
|
||||
@@ -62,7 +62,7 @@ Examples:
|
||||
| MT_HOST | Server host address | 0.0.0.0 | Any IP address |
|
||||
| MT_PORT | Server port | 8989 | 1-65535 |
|
||||
| MT_UI | Enable Web UI | false | true, false |
|
||||
| MT_OFFLINE | Offline mode (no auto model download) | false | true, false |
|
||||
| MT_OFFLINE | Offline mode, disable automatic download of new language models, only use downloaded models | false | true, false |
|
||||
| MT_WORKER_IDLE_TIMEOUT| Worker idle timeout (seconds) | 300 | Any positive integer |
|
||||
| API_TOKEN | API access token | empty | Any string |
|
||||
| CORE_API_TOKEN | API access token (alternative) | empty | Any string |
|
||||
@@ -148,7 +148,9 @@ The server provides compatible endpoints for multiple translation plugins:
|
||||
>
|
||||
> - [Kiss Translator](https://github.com/fishjar/kiss-translator) - Scroll down in `Settings` page to find the custom interface `Custom`. Similarly, set `Maximum Concurrent Requests` and `Request Interval Time` to fully utilize server performance. I set `Maximum Concurrent Requests` to `100` and `Request Interval Time` to `1`. You can adjust based on your server configuration.
|
||||
>
|
||||
> Configure the plugin's custom interface address according to the table below. Note: The first request will be slower because it needs to load the model. Subsequent requests will be faster.
|
||||
> **Important Note:** When translating a language pair for the first time, the server will automatically download the corresponding translation model (unless offline mode is enabled). This process may take some time depending on your network speed and model size. After the model is downloaded, the engine startup also requires a few seconds. Once ready, subsequent translation requests will enjoy millisecond-level response times. It's recommended to test a translation before actual use to allow the server to pre-download and load the models.
|
||||
>
|
||||
> Configure the plugin's custom interface address according to the table below.
|
||||
|
||||
| Name | URL | Plugin Setting |
|
||||
| ------------------------------------- | --------------------------------------------- | -------------------------------------------------------------------------------- |
|
||||
|
||||
Reference in New Issue
Block a user