structure

package
v0.0.0-...-a0e9b24 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 23, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PresentationResponseSchema = GenerateSchema[Presentation]()
	SlideResponseSchema        = GenerateSchema[Slide]()
)

Generate the JSON schema for Slide

Functions

func GenerateSchema

func GenerateSchema[T any]() interface{}

GenerateSchema generates the JSON schema for a given type

Types

type Illustration

type Illustration struct {
	Prompt string `json:"prompt" jsonschema_description:"A prompt to generate the illustration"`
	Alt    string `json:"alt" jsonschema_description:"The alternate text of the illustration"`
}

type Presentation

type Presentation struct {
	OriginalContent []byte  `json:"-"`
	Title           string  `json:"presentation_title" jsonschema_description:"The title of the presentation"`
	Subtitle        string  `json:"presentation_subtitle" jsonschema_description:"The subtitle of the presentation"`
	Slides          []Slide `json:"slides" jsonschema_description:"The content of the presentation"`
}

Presentation represents the entire presentation structure

type Slide

type Slide struct {
	Title        string       `json:"title" jsonschema_description:"The title of the slide"`
	Subtitle     string       `json:"subtitle" jsonschema_description:"The subtitle of the slide"`
	Body         string       `json:"body" jsonschema_description:"The main content of the slide or the description of the chapter"`
	Chapter      bool         `json:"chapter" jsonschema_description:"A boolean to indicate if this slides introduces a new chapter"`
	Illustration Illustration `` /* 168-byte string literal not displayed */
}

Slide represents a single slide in the presentation

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL