Error (importers/importers.go)

LocalAI · core/gallery/importers/importers.go · go · MIT
voice

Importer registry for LocalAI, handling model discovery, modality mapping, and ambiguous import errors.

// Source: https://github.com/mudler/LocalAI | License: MIT | Copyright 2023-2025 Ettore Di Giacinto (mudler@localai.io)
// Provided via justclaw.it.com; keep this notice with the code.
package importers

import (
	"encoding/json"
	"errors"
	"fmt"
	"os"
	"sort"
	"strings"

	"github.com/mudler/xlog"
	"gopkg.in/yaml.v3"

	"github.com/mudler/LocalAI/core/config"
	"github.com/mudler/LocalAI/core/gallery"
	"github.com/mudler/LocalAI/pkg/downloader"
	hfapi "github.com/mudler/LocalAI/pkg/huggingface-api"
)

// ErrAmbiguousImport is returned when HuggingFace metadata hints at a known
// modality (e.g. pipeline_tag: "automatic-speech-recognition") but no
// importer's artefact-level detection matches the repository. Callers should
// pass preferences.backend to disambiguate. Use errors.Is to match 

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key