Documentation ¶
Index ¶
- Constants
- func DrawStringWrapped(dc *gg.Context, ff font.Face, s string, ...) float64
- type Assets
- type Card
- type ChatGPTReader
- type DivineOption
- type DivineResult
- type DumbGPTReader
- type GPTReader
- type Position
- type Reader
- func (r *Reader) Choose() ([3]Card, error)
- func (r *Reader) DivineWithOption(ctx context.Context, opt DivineOption) (*DivineResult, error)
- func (r *Reader) Prompt(cards [3]Card, thing, template string) string
- func (r *Reader) Read(ctx context.Context, cards [3]Card, thing string) (string, error)
- func (r *Reader) Render(cards [3]Card, Q, A string, opt DivineOption) (image.Image, error)
Constants ¶
View Source
const ( PositionUpright = "Upright" PositionReversed = "Reversed" )
Variables ¶
This section is empty.
Functions ¶
func DrawStringWrapped ¶
func DrawStringWrapped(dc *gg.Context, ff font.Face, s string, x, y, ax, ay, width, lineSpacing float64, align gg.Align) float64
DrawStringWrapped word-wraps the specified string to the given max width and then draws it at the specified anchor point using the given line spacing and text alignment.
Types ¶
type Assets ¶
type Assets struct { Cards []Card BackgroundImg image.Image Font *truetype.Font FontFace font.Face AskerImg image.Image ReaderImg image.Image }
func GetDefaultAssets ¶
func GetDefaultAssets() Assets
type Card ¶
type ChatGPTReader ¶
type ChatGPTReader struct {
// contains filtered or unexported fields
}
func NewChatGPTReader ¶
func NewChatGPTReader(chatGPTCli *openai.Client) *ChatGPTReader
type DivineOption ¶
type Reader ¶
type Reader struct {
// contains filtered or unexported fields
}
func (*Reader) DivineWithOption ¶
func (r *Reader) DivineWithOption(ctx context.Context, opt DivineOption) (*DivineResult, error)
Click to show internal directories.
Click to hide internal directories.