Skip to content

Commit

Permalink
更新文件 在沉浸式翻译中使用simple-one-api.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fruitbars committed May 30, 2024
1 parent c45bdce commit 5694be6
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 9 deletions.
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,15 @@

## 使用方法

1. 启动服务:
1. **启动服务:**

**直接启动**

```bash
./simple-one-api [config](可选项,默认为config.json)
```
**nohup启动**

使用提供的`nohup_manage_simple_one_api.sh`脚本
- 启动:
```bash
Expand All @@ -112,7 +114,8 @@
./nohup_manage_simple_one_api.sh restart
```

**systemd**
**使用systemd服务**

也可以是使用准备好的脚本`install_simple_one_api_service.sh`
需要修改下其中的工作目录
```bash
Expand All @@ -137,7 +140,7 @@ sudo systemctl start simple-one-api
./nohup_manage_simple_one_api.sh restart
```

2. 调用 API:
**2. 调用 API:**

现在,你可以通过 OpenAI 兼容的接口调用你配置的各大模型服务。服务地址: `http://host:port/v1`,`api-key`可以任意设置

Expand Down Expand Up @@ -318,6 +321,8 @@ sudo systemctl start simple-one-api
]
}
```
### 在沉浸式翻译当中怎么使用?
参考[docs/在沉浸式翻译中使用simple-one-api](在沉浸式翻译中使用simple-one-api.md)

### 如何让后台模型随机使用?
`load_balancing`就是为自动选择模型来配置的,支持`random`,自动随机选一个`enabled``true`的模型
Expand Down
Binary file added docs/asset/image-20240530233647666.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/asset/image-20240530233748804.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/asset/image-20240530233817058.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/asset/image-20240530233858173.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/asset/image-20240530233928186.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/asset/image-20240530234334239.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 6 additions & 6 deletions docs/在沉浸式翻译中使用simple-one-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,27 +23,27 @@

1. 首先进入到设置当中

<img src="/Users/admin/Library/Application Support/typora-user-images/image-20240530233647666.png" alt="image-20240530233647666" style="zoom: 50%;" />
<img src="asset/image-20240530233647666.png" alt="image-20240530233647666" style="zoom: 50%;" />

2. 选择翻译服务,选中OpenAI,点去修改

<img src="/Users/admin/Library/Application Support/typora-user-images/image-20240530233748804.png" alt="image-20240530233748804" style="zoom:50%;" />
<img src="asset/image-20240530233748804.png" alt="image-20240530233748804" style="zoom:50%;" />

3. 输入后台设置的自定义模型列表这里我们填入了列表`spark-lite,ERNIE-Speed-8K,hunyuan-lite,random`

<img src="/Users/admin/Library/Application Support/typora-user-images/image-20240530233817058.png" alt="image-20240530233817058" style="zoom:50%;" />
<img src="asset/image-20240530233817058.png" alt="image-20240530233817058" style="zoom:50%;" />

4. 将模型设置为`random`,然后随机选一个模型使用

<img src="/Users/admin/Library/Application Support/typora-user-images/image-20240530233858173.png" alt="image-20240530233858173" style="zoom:50%;" />
<img src="asset/image-20240530233858173.png" alt="image-20240530233858173" style="zoom:50%;" />

5. 设置部署simple-one-api的服务地址

![image-20240530233928186](/Users/admin/Library/Application Support/typora-user-images/image-20240530233928186.png)
![image-20240530233928186](asset/image-20240530233928186.png)

6. 最后测试服务是否通畅

<img src="/Users/admin/Library/Application Support/typora-user-images/image-20240530234334239.png" alt="image-20240530234334239" style="zoom:50%;" />
<img src="asset/image-20240530234334239.png" alt="image-20240530234334239" style="zoom:50%;" />

## simple-one-api配置

Expand Down

0 comments on commit 5694be6

Please sign in to comment.