🌐 AI搜索 & 代理 主页
Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update pgml-extension/src/bindings/transformers/whitelist.rs
Co-authored-by: kczimm <4733573+kczimm@users.noreply.github.com>
  • Loading branch information
higuoxing and kczimm authored Apr 10, 2024
commit d05644aa43f8c4045dbe745676cca85a789f9d91
8 changes: 1 addition & 7 deletions pgml-extension/src/bindings/transformers/whitelist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ pub fn verify_task(task: &Value) -> Result<(), Error> {

let remote_code_allowed = trust_remote_code && model_is_trusted;
if !remote_code_allowed && task_trust == Some(true) {
bail!(
"model {} is not trusted to run remote code. Consider setting {} = 'true' or adding {} to {}",
task_model,
"pgml.huggingface_trust_remote_code",
task_model,
"pgml.huggingface_trust_remote_code_whitelist",
);
bail!("model {task_model} is not trusted to run remote code. Consider setting pgml.huggingface_trust_remote_code = 'true' or adding {task_model} to pgml.huggingface_trust_remote_code_whitelist");
}

Ok(())
Expand Down