You're looking at a specific version of this model. Jump to the model overview.

andreasjansson /codegen:211bde4f

Input schema

The fields you can use to run this model with an API. If you don’t give a value for a field its default value will be used.

Field Type Default value Description
context
string
# Implement a function that computes the square of an integer argument.
Some starting python code. CodeGen will try to complete the code provided. Providing examples of what you want to do before your prompt can improve performance.
prepend_context_to_output
boolean
True
Whether to prepend your input to the output.
num_return_sequences
integer
1

Min: 1

Max: 10

Number of code completions to generate from context.
temperature
number
0.2

Max: 1

Increase to improve diversity of outputs, may cause artifacts.
prepend_imports
boolean
True
Whether to prepend a numpy import to the context as in the paper.
top_p
number
0.95

Max: 1

Top-p sampling probability.
max_length
integer
128

Min: 32

Max: 2048

Max length of returned sequences.
seed
integer
-1
Seed for reproducibility. Use -1 for a random seed.
raw_output
boolean
False
Whether to return a long string (multiple code snippets separated by the string `======`) or a markdown url to be downloaded. May find useful for api.

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{'description': 'Helper Output class for CodeGen. Allows for output to be '
                'markdown file or string.',
 'properties': {'markdown': {'format': 'uri',
                             'title': 'Markdown',
                             'type': 'string'},
                'raw_output': {'title': 'Raw Output', 'type': 'string'}},
 'title': 'CodeGenOutput',
 'type': 'object'}