INNER CODE UNIT · Python

create_completion

hyperonym/basaran · basaran/__main__.py:131

def create_completion():
    """Create a completion for the provided prompt and parameters."""
    schema = {
        "prompt": str,
        "min_tokens": int,
        "max_tokens": int,
        "temperature": float,
        "top_p": float,
        "n": int,
        "stream": bool,
        "logprobs": int,
        "echo": bool,
    }
    options = parse_options(schema)
    if "prompt" not in options:
        options["prompt"] = ""

    # Limit maximum resource usage.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…