25 lines
1014 B
Go
25 lines
1014 B
Go
|
|
//go:build llm_script
|
||
|
|
|
||
|
|
package main
|
||
|
|
|
||
|
|
import "time"
|
||
|
|
|
||
|
|
var cloudflarePricingSignatureContainsNeedles = map[string]string{
|
||
|
|
"llm": "llm",
|
||
|
|
"pricing": "pricing",
|
||
|
|
"cf_model_prefix": "@cf/",
|
||
|
|
"price_tokens": "price in tokens",
|
||
|
|
}
|
||
|
|
|
||
|
|
func buildCloudflarePricingStructureSignature(raw string) markdownPricingStructureSignature {
|
||
|
|
return buildMarkdownPricingStructureSignature(raw, cloudflarePricingSignatureContainsNeedles)
|
||
|
|
}
|
||
|
|
|
||
|
|
func writeCloudflarePricingSnapshotArtifacts(raw string, sourceURL string, snapshotPath string, signaturePath string, now time.Time) (markdownPricingStructureSignature, error) {
|
||
|
|
return writeMarkdownPricingSnapshotArtifacts(raw, sourceURL, snapshotPath, signaturePath, now, cloudflarePricingSignatureContainsNeedles)
|
||
|
|
}
|
||
|
|
|
||
|
|
func resolveCloudflarePricingSnapshotPaths(snapshotPath string, signaturePath string, snapshotDir string, now time.Time) (string, string) {
|
||
|
|
return resolveMarkdownPricingSnapshotPaths(snapshotPath, signaturePath, snapshotDir, "cloudflare-pricing", now)
|
||
|
|
}
|