prompt

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2025 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

View Source
const Assistant = Role("assistant")
View Source
const MimeApplicationPDF = "application/pdf"
View Source
const MimeAudioMP3 = "audio/mp3"
View Source
const MimeAudioMPEG = "audio/mpeg"
View Source
const MimeAudioWAV = "audio/wav"
View Source
const MimeImageJPEG = "image/jpeg"
View Source
const MimeImagePNG = "image/png"
View Source
const MimeImageWebp = "image/webp"
View Source
const MimeTextPlain = "text/plain"
View Source
const MimeVideoAVI = "video/avi"
View Source
const MimeVideoFLV = "video/flv"
View Source
const MimeVideoMOV = "video/mov"
View Source
const MimeVideoMP4 = "video/mp4"
View Source
const MimeVideoMPEG = "video/mpeg"
View Source
const MimeVideoMPEGS = "video/mpegps"
View Source
const MimeVideoMPG = "video/mpg"
View Source
const MimeVideoWMV = "video/wmv"
View Source
const System = Role("system")
View Source
const User = Role("user")

Variables

Functions

This section is empty.

Types

type Payload added in v0.0.2

type Payload struct {
	Mime string `json:"mime_type"`
	Data string `json:"data"`
	Uri  string `json:"uri"`
}

type Prompt

type Prompt struct {
	Role    Role     `json:"role"`
	Text    string   `json:"text"`
	Payload *Payload `json:"payload,omitempty"`
}

func AsAssistant

func AsAssistant(text string) Prompt

func AsUser

func AsUser(text string) Prompt

func AsUserWithData added in v0.0.2

func AsUserWithData(mime string, data []byte) Prompt

func AsUserWithURI added in v0.7.0

func AsUserWithURI(mime string, uri string) Prompt

type Role

type Role string

Jump to

Keyboard shortcuts

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