prices

package
v2.36.11 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: AGPL-3.0 Imports: 5 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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