mirror of
https://github.com/koishijs/novelai-bot
synced 2025-01-08 11:17:32 +08:00
refa: rename trustedWorkerOnly to trustedWorkers (#156)
which matches the API using
This commit is contained in:
parent
a15d94d003
commit
ac3b6e64fc
@ -55,7 +55,7 @@ API 服务器地址。如果你搭建了私服,可以将此项设置为你的
|
||||
|
||||
要附加的额外请求头。如果你的 `endpoint` 是第三方服务器,你可能需要设置正确的请求头,否则请求可能会被拒绝。
|
||||
|
||||
### trustedWorkerOnly
|
||||
### trustedWorkers
|
||||
|
||||
- 类型: `boolean`
|
||||
- 默认值: `false`
|
||||
|
@ -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),
|
||||
}),
|
||||
]),
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user