ppt

Module Contents

Classes

PPT

Plugin to create ppt slides with text, paragraph, images in good looking styles.

AsyncPPT

Plugin to create ppt slides with text, paragraph, images in good looking styles.

Attributes

THEME_MAPPING

lagent.actions.ppt.THEME_MAPPING
class lagent.actions.ppt.PPT(theme_mapping=None, description=None, parser=JsonParser)

Bases: lagent.actions.base_action.BaseAction

Plugin to create ppt slides with text, paragraph, images in good looking styles.

参数:
theme_mapping
pointer = None
location = None
create_file(theme, abs_location)

Create a pptx file with specific themes.

参数:
  • theme (str) – the theme used. The value should be one of [‘Default’].

  • abs_location (str) – the ppt file’s absolute location

返回:

operation status
  • status: the result of the execution

返回类型:

dict

add_first_page(title, subtitle)

Add the first page of ppt.

参数:
  • title (str) – the title of ppt

  • subtitle (str) – the subtitle of ppt

返回:

operation status
  • status: the result of the execution

返回类型:

dict

add_text_page(title, bullet_items)

Add text page of ppt.

参数:
  • title (str) – the title of the page

  • bullet_items (str) – bullet_items should be string, for multiple bullet items, please use [SPAN] to separate them.

返回:

operation status
  • status: the result of the execution

返回类型:

dict

add_text_image_page(title, bullet_items, image)

Add a text page with one image. Image should be a path.

参数:
  • title (str) – the title of the page

  • bullet_items (str) – bullet_items should be string, for multiple bullet items, please use [SPAN] to separate them.

  • image (str) – the path of the image

返回:

operation status
  • status: the result of the execution

返回类型:

dict

submit_file()

When all steps done, YOU MUST use submit_file() to submit your work.

返回:

operation status
  • status: the result of the execution

返回类型:

dict

class lagent.actions.ppt.AsyncPPT(theme_mapping=None, description=None, parser=JsonParser)

Bases: lagent.actions.base_action.AsyncActionMixin, PPT

Plugin to create ppt slides with text, paragraph, images in good looking styles.

参数:
create_file(theme, abs_location)

Create a pptx file with specific themes.

参数:
  • theme (str) – the theme used. The value should be one of [‘Default’].

  • abs_location (str) – the ppt file’s absolute location

返回:

operation status
  • status: the result of the execution

返回类型:

dict

add_first_page(title, subtitle)

Add the first page of ppt.

参数:
  • title (str) – the title of ppt

  • subtitle (str) – the subtitle of ppt

返回:

operation status
  • status: the result of the execution

返回类型:

dict

add_text_page(title, bullet_items)

Add text page of ppt.

参数:
  • title (str) – the title of the page

  • bullet_items (str) – bullet_items should be string, for multiple bullet items, please use [SPAN] to separate them.

返回:

operation status
  • status: the result of the execution

返回类型:

dict

add_text_image_page(title, bullet_items, image)

Add a text page with one image. Image should be a path.

参数:
  • title (str) – the title of the page

  • bullet_items (str) – bullet_items should be string, for multiple bullet items, please use [SPAN] to separate them.

  • image (str) – the path of the image

返回:

operation status
  • status: the result of the execution

返回类型:

dict

submit_file()

When all steps done, YOU MUST use submit_file() to submit your work.

返回:

operation status
  • status: the result of the execution

返回类型:

dict