novelai_api.GlobalSettings

class GlobalSettings[source]

Bases: object

Object used to store global settings for the account

generate_until_sentence: bool

Generate up to 20 tokens after max_length if an end of sentence if found within these 20 tokens

num_logprobs: int

Number of logprobs to return for each token. Set to NO_LOGPROBS to disable

ban_brackets: bool

Apply the BRACKET biases

bias_dinkus_asterism: bool

Apply the DINKUS_ASTERISM biases

ban_ambiguous_genji_tokens: bool

Apply the GENJI_AMBIGUOUS_TOKENS if model is Genji

rep_pen_whitelist: bool

Apply the REP_PEN_WHITELIST (repetition penalty whitelist)

NO_LOGPROBS = -1

Value to set num_logprobs at to disable logprobs

__init__(*, generate_until_sentence: bool, num_logprobs: int, ban_brackets: bool, bias_dinkus_asterism: bool, ban_ambiguous_genji_tokens: bool, rep_pen_whitelist: bool)[source]
copy()[source]

Create a new GlobalSettings from the current

to_settings(model: novelai_api.Preset.Model) Dict[str, Any][source]

Create text generation settings from the GlobalSettings object

Parameters:

model – Model to use the settings of