update prompt
Browse files- app.py +2 -3
- presentation.py +20 -11
app.py
CHANGED
@@ -48,10 +48,9 @@ async def ppt_content(data):
|
|
48 |
result_1 = agent.run_sync(user_prompt = listOfString[0])
|
49 |
result_2 = agent.run_sync(user_prompt = listOfString[1],message_history=result_1.new_messages())
|
50 |
|
51 |
-
|
52 |
-
print(result_2.new_messages_json())
|
53 |
print(result_2.data)
|
54 |
-
|
55 |
|
56 |
def ai_ppt(data):
|
57 |
asyncio.run(ppt_content(data=data))
|
|
|
48 |
result_1 = agent.run_sync(user_prompt = listOfString[0])
|
49 |
result_2 = agent.run_sync(user_prompt = listOfString[1],message_history=result_1.new_messages())
|
50 |
|
51 |
+
|
|
|
52 |
print(result_2.data)
|
53 |
+
|
54 |
|
55 |
def ai_ppt(data):
|
56 |
asyncio.run(ppt_content(data=data))
|
presentation.py
CHANGED
@@ -5,17 +5,26 @@ from typing import List, Dict,Optional
|
|
5 |
|
6 |
|
7 |
@dataclass
|
8 |
-
class
|
9 |
-
title:str = Field(
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
|
19 |
@dataclass
|
20 |
class PPT(BaseModel):
|
21 |
-
per:list[
|
|
|
5 |
|
6 |
|
7 |
@dataclass
|
8 |
+
class Presentation(BaseModel):
|
9 |
+
title: str = Field(
|
10 |
+
description="The main title of the slide. Should be concise and descriptive, summarizing the core idea of the slide. Avoid lengthy titles and focus on clarity."
|
11 |
+
)
|
12 |
+
subTitle: Optional[str] = Field(
|
13 |
+
description="An optional subtitle for the slide, typically used on the first slide to provide context or additional information. It should complement the title and give more detail about the presentation topic."
|
14 |
+
)
|
15 |
+
author: Optional[str] = Field(
|
16 |
+
description="The name of the author or presenter, typically included on the first slide. Useful for attributing the presentation to a specific individual or organization."
|
17 |
+
)
|
18 |
+
text: str = Field(
|
19 |
+
description="The detailed description or narrative content of the slide. This should include key information, explanations, or supporting arguments. Keep it concise yet informative to avoid overwhelming the audience."
|
20 |
+
)
|
21 |
+
bulletPoints: Optional[List[str]] = Field(
|
22 |
+
description="A list of bullet points summarizing key information on the slide. Each bullet point should be short, focused, and highlight a specific aspect of the slide's topic. Avoid overcrowding; ideally, limit to 3-5 points."
|
23 |
+
)
|
24 |
+
imageSuggestion: Optional[str] = Field(
|
25 |
+
description="A prompt for generating an image to complement the slide content. Describe the desired visual in detail, including elements, style, and relevance to the topic. Ensure the prompt is actionable for AI tools."
|
26 |
+
)
|
27 |
|
28 |
@dataclass
|
29 |
class PPT(BaseModel):
|
30 |
+
per:list[Presentation] = Field(description="A list of `Presentation` objects, where each object represents a single slide in the PowerPoint presentation. Ensure that the list is ordered logically to maintain the flow of the presentation. Each `Presentation` object should provide the necessary details, including title, content, bullet points, and optional image suggestions, to create an engaging and informative slide deck.")
|