tokens

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Enabled         bool `yaml:"enabled"`
	Max             int  `yaml:"max"`
	RejectOnFailure bool `yaml:"reject_on_failure"`
}

func DefaultConfig added in v0.17.0

func DefaultConfig() Config

type MaxTokensRule

type MaxTokensRule struct {
	// contains filtered or unexported fields
}

func MaxTokens

func MaxTokens(cfg Config) *MaxTokensRule

func (*MaxTokensRule) Validate

func (t *MaxTokensRule) Validate(source *ast.Source) error

Jump to

Keyboard shortcuts

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