prices

package
v2.34.8 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Overview

Package prices seeds the ai_model_prices table from an embedded JSON price book at server startup.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Seed

func Seed(ctx context.Context, db database.Store) error

Seed applies the embedded price seed to ai_model_prices table, replacing the price columns of any existing (provider, model) row and inserting new ones. Rows already in the table that no longer appear in the seed are left untouched, so historical entries persist across upstream model deprecations.

func SeedFromBytes

func SeedFromBytes(ctx context.Context, db database.Store, data []byte) error

SeedFromBytes applies an arbitrary JSON seed. Most callers should use Seed, which applies the seed embedded in this binary; SeedFromBytes is exposed for tests that need to inject a deterministic seed.

Types

This section is empty.

Jump to

Keyboard shortcuts

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