Documentation ¶
Index ¶
- type AI
- func (ai *AI) ExtractTextFromAudio(ctx context.Context, filePath string) (string, error)
- func (ai *AI) GenerateImageFromText(ctx context.Context, prompt string) (image.Image, error)
- func (ai *AI) GeneratePresentationFromText(ctx context.Context, preprompt string, content []byte) (*structure.Presentation, error)
- func (ai *AI) GenerateSlide(ctx context.Context, preprompt string, content []byte) (*structure.Slide, error)
- func (ai *AI) SimpleQuery(ctx context.Context, prompt string) (string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AI ¶
type AI struct { Client *genai.Client Gemini *genai.GenerativeModel Token string // contains filtered or unexported fields }
func (*AI) ExtractTextFromAudio ¶
ExtractTextFromAudio extracts text from a given audio file. The filePath parameter specifies the path to the audio file. It returns a string containing the extracted text and an error if any issue occurs.
func (*AI) GenerateImageFromText ¶
GenerateImageFromText generates an image from a given text prompt. The prompt parameter provides the description of the image to generate. It returns the generated image as an image.Image object, and any error encountered.
func (*AI) GeneratePresentationFromText ¶
func (ai *AI) GeneratePresentationFromText(ctx context.Context, preprompt string, content []byte) (*structure.Presentation, error)
GeneratePresentationFromText generates a presentation from a pre-prompt and given text content. The preprompt parameter allows customization of the presentation context. The content parameter is a byte array representing the content of the presentation. It returns a Presentation object representing the generated presentation, and any error encountered.
func (*AI) GenerateSlide ¶
func (ai *AI) GenerateSlide(ctx context.Context, preprompt string, content []byte) (*structure.Slide, error)
GenerateSlide generates a slide from a pre-prompt and specific content. The preprompt parameter allows customization of the slide context. The content parameter is a byte array representing the content to include in the slide. It returns a Slide object representing the generated slide, and any error encountered.