sitcom_simulator.script.script_generator¶
Functions
|
|
|
|
|
Uses AI to generate a script matching the prompt. |
- sitcom_simulator.script.script_generator.write_script(prompt, manual_character_selection=False, max_tokens=2048, require_approval=False, temperature=0.5, model='gpt-4o-mini', custom_script_instructions=None, custom_character_instructions=None, fakeyou_characters=True, narrator_dropout=False)¶
Uses AI to generate a script matching the prompt.
If characters are passed in, the resulting dialog is constrained to those characters. Otherwise, it prompts the user to select the appropriate characters.
- Parameters:
prompt (
str
) – The prompt for the scriptmanual_character_selection – Whether to prompt the user to select the characters. If manual_character_selection == False and characters == None, an LLM will extract characters.
max_tokens (
int
) – The maximum number of tokens to generaterequire_approval (
bool
) – Whether to prompt the user to approve the generated scripttemperature (
float
) – The temperature to use when generating the scriptmodel (
str
) – The language model to usecustom_script_instructions (
str
|None
) – A string containing custom instructions for the language model writing the script. Must contain the placeholders ‘{prompt}’, ‘{music_categories}’, and ‘{characters}’.custom_character_instructions (
str
|None
) – A string containing custom instructions for the language model extracting the characters from the prompt. Must contain the placeholder ‘{prompt}’.fakeyou_characters (
bool
) – Whether to restrict character selection to only voices from fakeyou.comnarrator_dropout (
bool
) – Whether to forcibly remove narrators from the script (ChatGPT often goes heavy on the narrators)
- Return type:
- sitcom_simulator.script.script_generator.script_from_file(path)¶
- Return type:
- Parameters:
path (str)