@@ -101,10 +101,12 @@ def writing_with_prompt(
101
101
Returns:
102
102
str: Response from NotionAI
103
103
"""
104
+ if prompt_type == PromptTypeEnum .continue_writing :
105
+ return self .continue_write (context , page_title )
106
+
104
107
if prompt_type in {
105
108
PromptTypeEnum .help_me_write ,
106
109
PromptTypeEnum .help_me_edit ,
107
- PromptTypeEnum .continue_writing ,
108
110
PromptTypeEnum .translate ,
109
111
}:
110
112
raise ValueError ("Please use the specific method for this prompt type" )
@@ -235,40 +237,40 @@ def simplify_language(self, context: str, page_title: str = "") -> str:
235
237
)
236
238
237
239
def blog_post (self , prompt : str ) -> str :
238
- return self .write_with_topic (TopicEnum .blog_ost , prompt )
240
+ return self .writing_with_topic (TopicEnum .blog_post , prompt )
239
241
240
242
def brainsteam (self , prompt : str ) -> str :
241
- return self .write_with_topic (TopicEnum .brainsteam , prompt )
243
+ return self .writing_with_topic (TopicEnum .brainsteam , prompt )
242
244
243
245
def outline (self , prompt : str ) -> str :
244
- return self .write_with_topic (TopicEnum .outline , prompt )
246
+ return self .writing_with_topic (TopicEnum .outline , prompt )
245
247
246
248
def social_media_post (self , prompt : str ) -> str :
247
- return self .write_with_topic (TopicEnum .social_media_post , prompt )
249
+ return self .writing_with_topic (TopicEnum .social_media_post , prompt )
248
250
249
251
def creative_story (self , prompt : str ) -> str :
250
- return self .write_with_topic (TopicEnum .creative_story , prompt )
252
+ return self .writing_with_topic (TopicEnum .creative_story , prompt )
251
253
252
254
def poem (self , prompt : str ) -> str :
253
- return self .write_with_topic (TopicEnum .poem , prompt )
255
+ return self .writing_with_topic (TopicEnum .poem , prompt )
254
256
255
257
def essay (self , prompt : str ) -> str :
256
- return self .write_with_topic (TopicEnum .essay , prompt )
258
+ return self .writing_with_topic (TopicEnum .essay , prompt )
257
259
258
260
def meeting_agenda (self , prompt : str ) -> str :
259
- return self .write_with_topic (TopicEnum .meeting_agenda , prompt )
261
+ return self .writing_with_topic (TopicEnum .meeting_agenda , prompt )
260
262
261
263
def press_release (self , prompt : str ) -> str :
262
- return self .write_with_topic (TopicEnum .press_release , prompt )
264
+ return self .writing_with_topic (TopicEnum .press_release , prompt )
263
265
264
266
def job_description (self , prompt : str ) -> str :
265
- return self .write_with_topic (TopicEnum .job_description , prompt )
267
+ return self .writing_with_topic (TopicEnum .job_description , prompt )
266
268
267
269
def sales_email (self , prompt : str ) -> str :
268
- return self .write_with_topic (TopicEnum .sales_email , prompt )
270
+ return self .writing_with_topic (TopicEnum .sales_email , prompt )
269
271
270
272
def recruiting_email (self , prompt : str ) -> str :
271
- return self .write_with_topic (TopicEnum .recruiting_email , prompt )
273
+ return self .writing_with_topic (TopicEnum .recruiting_email , prompt )
272
274
273
275
274
276
class NotionAIStream (NotionAI ):
0 commit comments