attribution

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2025 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package attribution provides model-to-author mapping functionality across multiple providers. It supports three attribution modes to handle different provider scenarios:

  1. Provider-only: All models from a specific provider belong to an author
  2. Provider + patterns: Only matching models from a provider, then cross-provider attribution
  3. Global patterns: Direct pattern matching across all providers

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attributions

type Attributions interface {
	// Attribute attempts to match a model id to the author of a model. A model can have multiple authors.
	// Returns the list of authors and true if any attributions were found.
	Attribute(modelID string) ([]catalogs.AuthorID, bool)
}

Attributions defines the interface for model attribution functionality.

func New

func New(catalog catalogs.Reader) (Attributions, error)

New creates a new attribution service using the provided catalog. All attribution mappings are pre-computed during initialization for O(1) lookups.

Jump to

Keyboard shortcuts

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