Documentation
¶
Index ¶
- Constants
- func DeconstructState(state State) []string
- func Gen(chain GenerativeChain) ([]string, error)
- func GenPruned(chain GenerativeChain, validGram func([]string) bool) ([]string, error)
- func GenPrunedWithStart(chain GenerativeChain, start State, validGram func([]string) bool) ([]string, error)
- func GenThreaded(chain GenerativeChain, validGram func([]string) bool, timeout time.Duration) ([]string, error)
- func GenThreadedWithStart(chain GenerativeChain, start State, validGram func([]string) bool, ...) ([]string, error)
- func GenWithStart(chain GenerativeChain, start State) ([]string, error)
- type Chain
- type CompressedChain
- type CompressedChoices
- type CompressedModel
- type GenerativeChain
- type Model
- type Result
- type State
Constants ¶
View Source
const BEGIN = "</BEGIN/>"
View Source
const END = "</END/>"
View Source
const ErrGenerationTimeout = errorCause("sentence generation timed out")
View Source
const ErrSentenceFailedValidation = errorCause("sentence failed validation")
View Source
const ErrSentenceTooShort = errorCause("generated sentence too short")
View Source
const ErrStateNotFound = errorCause("state does not exist in model")
View Source
const SEP = "</SEP/>"
Variables ¶
This section is empty.
Functions ¶
func DeconstructState ¶ added in v1.0.1
func Gen ¶ added in v1.0.1
func Gen(chain GenerativeChain) ([]string, error)
func GenPruned ¶ added in v1.0.1
func GenPruned( chain GenerativeChain, validGram func([]string) bool, ) ([]string, error)
func GenPrunedWithStart ¶ added in v1.0.1
func GenThreaded ¶ added in v1.0.1
func GenThreadedWithStart ¶ added in v1.0.1
func GenWithStart ¶ added in v1.0.1
func GenWithStart(chain GenerativeChain, start State) ([]string, error)
Types ¶
type Chain ¶ added in v1.0.1
type Chain struct {
Model Model
// contains filtered or unexported fields
}
func (*Chain) Compress ¶ added in v1.0.1
func (chain *Chain) Compress() *CompressedChain
type CompressedChain ¶ added in v1.0.1
type CompressedChain struct {
Model CompressedModel
// contains filtered or unexported fields
}
type CompressedChoices ¶ added in v1.0.1
type CompressedModel ¶ added in v1.0.1
type CompressedModel = map[State]CompressedChoices
type GenerativeChain ¶ added in v1.0.1
type GenerativeChain interface {
// contains filtered or unexported methods
}
Click to show internal directories.
Click to hide internal directories.