mutators

package
v1.17.2 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2024 License: MIT Imports: 73 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",
	"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 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