attribution

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2026 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

func Apply added in v0.0.20

func Apply(catalog *catalogs.Builder) error

Apply populates author.Models in the catalog using attribution patterns from authors.yaml. This is the primary entry point for applying attributions.

The function:

  1. Builds attribution mappings from catalog's authors
  2. Matches models to authors based on patterns
  3. Populates author.Models for each matched author

Example:

if err := attribution.Apply(catalog); err != nil {
    return fmt.Errorf("failed to apply attributions: %w", err)
}

Types

This section is empty.

Directories

Path Synopsis
Package matcher provides a unified interface for pattern matching using glob and regex patterns.
Package matcher provides a unified interface for pattern matching using glob and regex patterns.

Jump to

Keyboard shortcuts

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