Documentation
¶
Index ¶
- Constants
- type HuggingFace
- func (h *HuggingFace) Completion(ctx context.Context, prompt string) (string, error)
- func (h *HuggingFace) WithMaxLength(maxLength int) *HuggingFace
- func (h *HuggingFace) WithMinLength(minLength int) *HuggingFace
- func (h *HuggingFace) WithMode(mode HuggingFaceMode) *HuggingFace
- func (h *HuggingFace) WithModel(model string) *HuggingFace
- func (h *HuggingFace) WithTemperature(temperature float32) *HuggingFace
- func (h *HuggingFace) WithToken(token string) *HuggingFace
- func (h *HuggingFace) WithTopK(topK int) *HuggingFace
- func (h *HuggingFace) WithTopP(topP float32) *HuggingFace
- func (h *HuggingFace) WithVerbose(verbose bool) *HuggingFace
- type HuggingFaceMode
Constants ¶
View Source
const APIBaseURL = "https://api-inference.huggingface.co/models/"
View Source
const (
ErrHuggingFaceCompletion = "huggingface completion error"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HuggingFace ¶ added in v0.0.9
type HuggingFace struct {
// contains filtered or unexported fields
}
func (*HuggingFace) Completion ¶ added in v0.0.9
func (*HuggingFace) WithMaxLength ¶ added in v0.0.9
func (h *HuggingFace) WithMaxLength(maxLength int) *HuggingFace
func (*HuggingFace) WithMinLength ¶ added in v0.0.9
func (h *HuggingFace) WithMinLength(minLength int) *HuggingFace
func (*HuggingFace) WithMode ¶ added in v0.0.9
func (h *HuggingFace) WithMode(mode HuggingFaceMode) *HuggingFace
func (*HuggingFace) WithModel ¶ added in v0.0.9
func (h *HuggingFace) WithModel(model string) *HuggingFace
func (*HuggingFace) WithTemperature ¶ added in v0.0.9
func (h *HuggingFace) WithTemperature(temperature float32) *HuggingFace
func (*HuggingFace) WithToken ¶ added in v0.0.9
func (h *HuggingFace) WithToken(token string) *HuggingFace
func (*HuggingFace) WithTopK ¶ added in v0.0.9
func (h *HuggingFace) WithTopK(topK int) *HuggingFace
func (*HuggingFace) WithTopP ¶ added in v0.0.9
func (h *HuggingFace) WithTopP(topP float32) *HuggingFace
func (*HuggingFace) WithVerbose ¶ added in v0.0.9
func (h *HuggingFace) WithVerbose(verbose bool) *HuggingFace
type HuggingFaceMode ¶
type HuggingFaceMode int
const ( HuggingFaceModeCoversational HuggingFaceMode = iota HuggingFaceModeTextGeneration )
Click to show internal directories.
Click to hide internal directories.