Skip to content

Commit

Permalink
Fix guidance permission check (#782)
Browse files Browse the repository at this point in the history
  • Loading branch information
sceuick authored Dec 28, 2023
1 parent 2fb5678 commit 3f55395
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion srv/adapter/generate.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export async function guidanceAsync(opts: InferenceRequest) {
return inference
}

if (sub?.preset?.guidanceCapable && sub.tier?.guidanceAccess) {
if (sub?.preset?.guidanceCapable && (sub.tier?.guidanceAccess || opts.user.admin)) {
const result = await infer({ prompt: opts.prompt, tokens: 200, stop: opts.stop }, true)
return result
}
Expand Down

0 comments on commit 3f55395

Please sign in to comment.