File size: 465 Bytes
01f2fb9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
def create_prompt(bytecode: str):
    return (
        "\n\n".join(
            [
                "### Instruction:",
                "Using the provided Python 3.7 bytecode chunk, continue outputting the Python source code",
                "### Input:",
                bytecode,
                "### Response:",
            ]
        )
        + "\n\n"
    )


def is_bytecode_empty(bytecode: str):
    return bytecode.strip() == "LOAD_CONST None\nRETURN_VALUE"