Parameters |
int | the number of sentences (optional, default=1) |
---|
Object (or Map in Java) | the options for generation (all optional)
{float} options.temperature: The temperature parameter acts as a knob to adjust the probability that input elements will be selected for the output. At higher values, infrequent words are more likely to be chosen, while at lower values the most frequent inputs are more likely to be output. If no value is provided, then tokens are chosen according to their relative frequency in the input.
Range: between 0 and positive infinity (excluding both) Default: exactly mapped to frequencies in the input Lower values move the highest-weighted output toward a probability of 1.0. Higher values tend to even out all probabilities (toward random selection).
The temperature parameter function similarly to its use with softmax in neural networks. See this page for a more in-depth explanation.
{int} options.minLength: minimal length of the sentences, default=5
{int} options.maxLength: maximum length of the sentences, default=35
{boolean} options.allowDuplicates: if true, allow result to have duplicated sentences
{String or Array} options.startTokens: text from which the generation should start. |
---|
|