parser

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2023 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultMultiplier = 0.5
View Source
const DefaultWeight = 1

Variables

This section is empty.

Functions

This section is empty.

Types

type ParsedPrompt

type ParsedPrompt struct {
	Tags      []*PromptTag   `json:"tags"`
	Loras     []*PromptModel `json:"loras"`
	Hypernets []*PromptModel `json:"hypernets"`
}

type PromptModel

type PromptModel struct {
	Filename   string  `json:"filename"`
	Multiplier float64 `json:"multiplier"`
}

type PromptParser

type PromptParser struct{}

func NewPromptParser

func NewPromptParser() *PromptParser

func (*PromptParser) BeautifyPrompt

func (parser *PromptParser) BeautifyPrompt(input string) (string, error)

func (*PromptParser) ParsePrompt

func (parser *PromptParser) ParsePrompt(input string) (*ParsedPrompt, error)

type PromptTag

type PromptTag struct {
	Tag    string  `json:"tag"`
	Weight float64 `json:"weight"`
}

Jump to

Keyboard shortcuts

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