mutators

package
v1.20.1 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2025 License: MIT Imports: 74 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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",
	"chatlegacy":      "OpenAssistant/oasst-sft-4-pythia-12b-epoch-3.5",
	"starcoder":       "bigcode/starcoder",
	"ll2c7":           "meta-llama/Llama-2-7b-chat-hf",
	"ll2c13":          "meta-llama/Llama-2-13b-chat-hf",
	"ll2c70":          "meta-llama/Llama-2-70b-chat-hf",
	"chat":            "meta-llama/Llama-2-70b-chat-hf",
	"clb7":            "codellama/CodeLlama-7b-hf",
	"clb13":           "codellama/CodeLlama-13b-hf",
	"cli34":           "codellama/CodeLlama-34b-Instruct-hf",
}

Functions

func ErrWrongNumberOfArgs

func ErrWrongNumberOfArgs(amin, amax, got int) error

func J2Y

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

func NDJSONIndent added in v1.20.1

func NDJSONIndent(w io.WriteCloser, r io.ReadCloser, arg 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 {
	Options    map[string]any `json:"options"`
	Inputs     string         `json:"inputs"`
	Parameters map[string]any `json:"parameters,omitempty"`
}

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