refa: rename trustedWorkerOnly to trustedWorkers (#156)

which matches the API using
This commit is contained in:
Maiko Sinkyaet Tan 2023-01-09 11:53:30 +08:00 committed by GitHub
parent a15d94d003
commit ac3b6e64fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View File

@ -55,7 +55,7 @@ API 服务器地址。如果你搭建了私服,可以将此项设置为你的
要附加的额外请求头。如果你的 `endpoint` 是第三方服务器,你可能需要设置正确的请求头,否则请求可能会被拒绝。
### trustedWorkerOnly
### trustedWorkers
- 类型: `boolean`
- 默认值: `false`

View File

@ -176,7 +176,7 @@ export interface Config extends PromptConfig, ParamConfig {
recallTimeout?: number
maxConcurrency?: number
pollInterval?: number
trustedWorkerOnly?: boolean
trustedWorkers?: boolean
}
export const Config = Schema.intersect([
@ -231,7 +231,7 @@ export const Config = Schema.intersect([
Schema.const('censor').description('屏蔽'),
Schema.const('allow').description('允许'),
]).description('是否允许 NSFW 内容。').default('allow'),
trustedWorkerOnly: Schema.boolean().description('是否只请求可信任工作节点。').default(false),
trustedWorkers: Schema.boolean().description('是否只请求可信任工作节点。').default(false),
pollInterval: Schema.number().role('time').description('轮询进度间隔时长。').default(Time.second),
}),
]),

View File

@ -301,7 +301,7 @@ export function apply(ctx: Context, config: Config) {
n: 1,
},
nsfw: config.nsfw !== 'disallow',
trusted_workers: config.trustedWorkerOnly,
trusted_workers: config.trustedWorkers,
censor_nsfw: config.nsfw === 'censor',
models: [options.model],
source_image: image?.base64,