Documentation
¶
Index ¶
- func BoolPtr(v bool) *bool
- func EstimateTokens(text string) int64
- func ExpandSliceToFit[T any](slice []T, index int) []T
- func JsonSchemaResolve[T any]() (*jsonschema.Resolved, string, error)
- func JsonSchemaValidate(resolved *jsonschema.Resolved, str string, result any) error
- func Ptr[T any](v T) *T
- type IntOrInf
- type WriterSeeker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateTokens ¶
func ExpandSliceToFit ¶
func JsonSchemaResolve ¶
func JsonSchemaResolve[T any]() (*jsonschema.Resolved, string, error)
func JsonSchemaValidate ¶
func JsonSchemaValidate(resolved *jsonschema.Resolved, str string, result any) error
Types ¶
type IntOrInf ¶
type IntOrInf int
IntOrInf is a type that can be either an int or "inf".
func (IntOrInf) MarshalJSON ¶
MarshalJSON marshals the IntOrInf to JSON.
func (*IntOrInf) UnmarshalJSON ¶
UnmarshalJSON unmarshals the IntOrInf from JSON.
type WriterSeeker ¶
type WriterSeeker struct {
// contains filtered or unexported fields
}
WriterSeeker is an in-memory io.WriteSeeker implementation
func (*WriterSeeker) BytesReader ¶
func (ws *WriterSeeker) BytesReader() *bytes.Reader
BytesReader returns a *bytes.Reader. Use it when you need a reader that implements the io.ReadSeeker interface
func (*WriterSeeker) Reader ¶
func (ws *WriterSeeker) Reader() io.Reader
Reader returns an io.Reader. Use it, for example, with io.Copy, to copy the content of the WriterSeeker buffer to an io.Writer
Click to show internal directories.
Click to hide internal directories.