Review syntax after model without typo whitelist
This commit is contained in:
@@ -31,8 +31,8 @@ def propose(source):
|
||||
raise FileNotFoundError("llama-completion executable missing")
|
||||
if _sha256(executable) != lock["runtime_entrypoint_sha256"]:
|
||||
raise ValueError("llama-completion checksum mismatch")
|
||||
if source not in ('print("hello"', 'print("hello"\n'):
|
||||
raise ValueError("real-model adapter only supports the hello fixture")
|
||||
if len(source.encode("utf-8")) > 1024 or "\n" in source.rstrip("\n"):
|
||||
raise ValueError("demo source must be one bounded line")
|
||||
prompt = lock["prompt_template"].format(source_line=source.rstrip("\n"))
|
||||
command = [str(executable), "-m", str(model), "-p", prompt,
|
||||
"-n", str(lock["max_output_tokens"]), "-c", str(lock["context_tokens"]),
|
||||
|
||||
Reference in New Issue
Block a user