mutators

package
v1.12.0 Latest Latest
Warning

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

Go to latest
Published: May 18, 2023 License: MIT Imports: 60 Imported by: 0

Documentation

Index

Constants

View Source
const (
	WrapMaxChars = 80
	IndentChars  = 4
)

Variables

View Source
var HuggingFaceCommonTasks = map[string]string{

	"fillmask":        "bert-base-uncased",
	"summarization":   "facebook/bart-large-cnn",
	"classification":  "distilbert-base-uncased-finetuned-sst-2-english",
	"text-generation": "gpt2",
	"ner":             "dbmdz/bert-large-cased-finetuned-conll03-english",
	"translation":     "t5-base",
	"bloom":           "bigscience/bloom",
	"bloomz":          "bigscience/bloomz",
	"chat":            "OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
	"starcoder":       "bigcode/starcoder",
}

Functions

func ErrWrongNumberOfArgs

func ErrWrongNumberOfArgs(min, max, got int) error

func J2Y

func J2Y(w io.WriteCloser, r io.ReadCloser, _ any) (int64, error)

func Y2J

func Y2J(w io.WriteCloser, r io.ReadCloser, _ any) (int64, error)

Types

type HuggingFaceRequest added in v1.12.0

type HuggingFaceRequest struct {
	Inputs  string         `json:"inputs"`
	Options map[string]any `json:"options"`
}

type Response

type Response struct {
	Data struct {
		Translations []struct {
			TranslatedText         string
			DetectedSourceLanguage string
		}
	}
}

Jump to

Keyboard shortcuts

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