Add snapshot, signature, and drift guard support for Vertex AI, Cloudflare Workers AI, and Perplexity API, backed by a queryable audit table and recent-window view. This commit also wires the audit query layer into daily signal materialization and report generation so structure drift becomes a first-class signal instead of a log-only artifact.
25 lines
1.0 KiB
Go
25 lines
1.0 KiB
Go
//go:build llm_script
|
|
|
|
package main
|
|
|
|
import "time"
|
|
|
|
var perplexityPricingSignatureContainsNeedles = map[string]string{
|
|
"model_column": "| model |",
|
|
"input_price_column": "input price",
|
|
"output_price_column": "output price",
|
|
"documentation_column": "documentation",
|
|
}
|
|
|
|
func buildPerplexityPricingStructureSignature(raw string) markdownPricingStructureSignature {
|
|
return buildMarkdownPricingStructureSignature(raw, perplexityPricingSignatureContainsNeedles)
|
|
}
|
|
|
|
func writePerplexityPricingSnapshotArtifacts(raw string, sourceURL string, snapshotPath string, signaturePath string, now time.Time) (markdownPricingStructureSignature, error) {
|
|
return writeMarkdownPricingSnapshotArtifacts(raw, sourceURL, snapshotPath, signaturePath, now, perplexityPricingSignatureContainsNeedles)
|
|
}
|
|
|
|
func resolvePerplexityPricingSnapshotPaths(snapshotPath string, signaturePath string, snapshotDir string, now time.Time) (string, string) {
|
|
return resolveMarkdownPricingSnapshotPaths(snapshotPath, signaturePath, snapshotDir, "perplexity-pricing", now)
|
|
}
|