| | |
| | | from typing import Dict, List, Union
|
| | | import random
|
| | | import copy
|
| | | import argparse
|
| | |
|
| | |
|
| | | # TO DO
|
| | | ROOT_PATH = "/path/to/FilmAgent"
|
| | |
| | | prompt = read_prompt(os.path.join(ROOT_PATH, f"Prompt\{identity}.txt") )
|
| | | prompt = prompt_format(prompt, params)
|
| | | log_prompt(self.log_path, prompt)
|
| | | result = GPTCall(prompt)
|
| | | result = LLMCall(prompt, model)
|
| | | if trans2json:
|
| | | result = clean_text(result)
|
| | | result = GPTResponse2JSON(result)
|
| | |
| | |
|
| | |
|
| | | if __name__ == '__main__':
|
| | | parser = argparse.ArgumentParser()
|
| | | parser.add_argument('--model', help="LLM to be called", type=str)
|
| | | args = parser.parse_args()
|
| | | model = args.model
|
| | | |
| | | f = FilmCrafter(topic = "Reconcilation in a friend reunion")
|
| | | print("Characters selecting >>>")
|
| | | f.casting()
|