| | from create_world.creator import create_custom_world, create_scenario, create_storyline |
| | from create_world.utils import load_txt, load_yaml |
| | from create_character.personal_profile import generate_character_creation_questions, create_character_profile, parse_character_data_to_json |
| | from play_game.main import play_game |
| |
|
| | def main(): |
| | config = load_yaml(path='create_world/prompt.yaml') |
| |
|
| | print("LRPG ๊ฒ์์ ์ค์ ๊ฒ์ ํ์ํฉ๋๋ค. ์ด๊ณณ์์ ๋น์ ๋ง์ ์ธ๊ณ ์, ๋น์ ๋ง์ ์บ๋ฆญํฐ๋ก, ๋น์ ๋ง์ ์ ํ์ ํตํด ๋น์ ๋ง์ ์ด์ผ๊ธฐ๋ฅผ ๋ง๋ค์ด๊ฐ์ธ์.") |
| | print('-----------------------------') |
| |
|
| | |
| | custom = input('์๋ก์ด ์ด์ผ๊ธฐ๋ฅผ ๋ง๋ค๊ณ ์ถ์ผ๋ฉด yes, ํด๋ฆฌํฌํฐ ๊ฒ์์ ๋ถ๋ฌ์ค๊ณ ์ถ์ผ๋ฉด no๋ฅผ ์
๋ ฅํด ์ฃผ์ธ์: ') |
| | if custom == 'yes': |
| | topic, world_summary = create_custom_world(config['create_custom_world_prompt'], language='ํ๊ตญ์ด', save=False) |
| | scenario = create_scenario(topic, world_summary, config['create_scenario_prompt'], output_count=1) |
| | round_stories = create_storyline(topic, scenario[0], config['create_storyline_prompt']) |
| | |
| | else: |
| | |
| | print("์ธ๊ณ๊ด ๋ก๋ฉ์ค์
๋๋ค... (ํด๋ฆฌํฌํฐ)") |
| | world_summary_path = 'harrypotter_scenario/world_summary.txt' |
| | topic = 'harry potter' |
| | world_summary = load_txt(world_summary_path) |
| | |
| | scenario = create_scenario(topic, world_summary, config['create_scenario_prompt'], output_count=1) |
| | round_stories = create_storyline(topic, scenario[0], config['create_storyline_prompt']) |
| | |
| | print("์ธ๊ณ๊ฐ ๋ง๋ค์ด์ก์ต๋๋ค!") |
| | print('-----------------------------') |
| | |
| | |
| | print("๋ค์์ ๊ฒ์์์ ํ๋ ์ดํ ๋น์ ์ ์บ๋ฆญํฐ๋ฅผ ๋ง๋ค๊ฒ ์ต๋๋ค") |
| |
|
| | questions = generate_character_creation_questions(world_summary) |
| | character_description = create_character_profile(questions) |
| | character_profile = parse_character_data_to_json(character_description) |
| | print("์บ๋ฆญํฐ ์์ฑ์ด ์๋ฃ๋์์ต๋๋ค!") |
| | print("๋น์ ์บ๋ฆญํฐ์ ์ ๋ณด๋ ๋ค์๊ณผ ๊ฐ์ต๋๋ค: ", character_profile) |
| | print('-----------------------------') |
| | |
| | |
| | play_game(round_stories, world_summary, character_profile) |
| |
|
| |
|
| | if __name__ == "__main__": |
| | main() |