pvanand commited on
Commit
cbc1542
·
verified ·
1 Parent(s): 257faed

Update presentation_api.py

Browse files
Files changed (1) hide show
  1. presentation_api.py +9 -12
presentation_api.py CHANGED
@@ -25,20 +25,17 @@ router = APIRouter(
25
  from typing import Dict
26
  from pydantic import BaseModel, Field
27
 
28
- # First, let's create a proper input schema for the plan tool
29
- class PlanInput(BaseModel):
30
- input: Dict[str, str] = Field(
31
- ..., # This makes the field required
32
- description="Dictionary containing slide numbers as keys and descriptions as values",
33
- example={
34
- "1": "Title page for presentation",
35
- "2": "Introduction section with key points",
36
- "3": "Main content overview"
37
- }
38
- )
39
 
40
  @tool(parse_docstring=True)
41
- def plan(input: PlanInput) -> str:
42
  """Input presentation plan with numbered slides and their descriptions.
43
  Returns a confirmation message indicating that the plan has been created.
44
 
 
25
  from typing import Dict
26
  from pydantic import BaseModel, Field
27
 
28
+ class Slide(BaseModel):
29
+ slide_number: int
30
+ title: str
31
+ description: str
32
+
33
+ # Define the slides container
34
+ class SlidesInput(BaseModel):
35
+ slides: List[Slide]
 
 
 
36
 
37
  @tool(parse_docstring=True)
38
+ def plan(input: SlidesInput) -> str:
39
  """Input presentation plan with numbered slides and their descriptions.
40
  Returns a confirmation message indicating that the plan has been created.
41