@@ -47,10 +47,10 @@ class Character(BaseModel):
47
47
relationship_to_other_characters : str
48
48
character_arc_in_the_movie : str
49
49
50
- @ staticmethod
51
- @gpt_function
52
- def list_from_plot (n : int , plot : str ) -> List [" Character" ]:
53
- """Flesh out {n} main characters for the given plot. Be concise."""
50
+
51
+ @gpt_function
52
+ def invent_characters_from_plot (n : int , plot : str ) -> List [Character ]:
53
+ """Flesh out {n} main characters for the given plot. Be concise."""
54
54
55
55
56
56
class ActOutline (BaseModel ):
@@ -60,9 +60,9 @@ class ActOutline(BaseModel):
60
60
61
61
62
62
@gpt_function (reasoning = True )
63
- def list_from_plot (
63
+ def act_outlines_from_plot (
64
64
n : int , plot : str , characters : list [Character ]
65
- ) -> list [" ActOutline" ]:
65
+ ) -> list [ActOutline ]:
66
66
"""Come up with {n} acts for the movie, with for each a title and a summary
67
67
explaining which characters are involved (use full names) and what they do."""
68
68
@@ -74,11 +74,11 @@ class SceneOutline(BaseModel):
74
74
75
75
76
76
@gpt_function
77
- def list_from_act_outline (
77
+ def scene_outlines_from_act_outline (
78
78
act_outline : ActOutline ,
79
79
full_story_plot : str ,
80
80
background_on_characters : list [Character ],
81
- ) -> list [" SceneOutline" ]:
81
+ ) -> list [SceneOutline ]:
82
82
"""Decompose the act into scenes, and for each scene provide a summary.
83
83
The summary should use characters (with their full name) mentioned in the
84
84
act outline, and from the provided list.
@@ -121,7 +121,7 @@ async def from_outline(
121
121
semaphore : asyncio .Semaphore ,
122
122
) -> "Scene" :
123
123
text = await cls .write_scene_text (
124
- scene_outline = scene_outline ,
124
+ scene_outline = scene_outline . summary ,
125
125
act_outline = act_outline ,
126
126
background_on_characters = background_on_characters ,
127
127
gpt_system_prompt = gpt_system_prompt ,
@@ -140,16 +140,16 @@ async def from_outline(
140
140
characters : list [Character ],
141
141
gpt_system_prompt : str ,
142
142
async_semaphore : asyncio .Semaphore ,
143
- ) -> list [ "Act" ] :
144
- scene_outlines = SceneOutline . list_from_act_outline (
143
+ ) -> "Act" :
144
+ scene_outlines = scene_outlines_from_act_outline (
145
145
act_outline .summary ,
146
146
full_story_plot = plot ,
147
147
background_on_characters = characters ,
148
148
gpt_system_prompt = gpt_system_prompt ,
149
149
)
150
150
scene_text_futures = [
151
151
Scene .from_outline (
152
- scene_outline = scene_outline . summary ,
152
+ scene_outline = scene_outline ,
153
153
act_outline = act_outline .summary ,
154
154
background_on_characters = [
155
155
c for c in characters if c .name in scene_outline .character_names
@@ -183,10 +183,10 @@ async def from_subject(
183
183
print ("Title:" , outline .title )
184
184
print ("Synopsis:" , outline .synopsis )
185
185
print ("\n Writing that story..." )
186
- characters = Character . list_from_plot (
186
+ characters = invent_characters_from_plot (
187
187
n = n_characters , plot = outline .plot , gpt_model = "gpt-4o" , ** kwargs
188
188
)
189
- act_outlines = ActOutline . list_from_plot (
189
+ act_outlines = act_outlines_from_plot (
190
190
n_acts , outline .plot , characters , gpt_model = "gpt-4o" , ** kwargs
191
191
)
192
192
0 commit comments