fix(pricing): support Perplexity/Vertex price format without dollar sign
- official_pricing_import_common.go: make dollar sign optional in firstDollarPrice regex - perplexity_pricing_lib.go: fix column detection to match 'Input ($/1M)' format - also updated vertex and perplexity baseline snapshots
This commit is contained in:
@@ -362,7 +362,7 @@ func cleanHTMLText(raw string) string {
|
||||
}
|
||||
|
||||
func firstDollarPrice(raw string) (float64, bool) {
|
||||
pattern := regexp.MustCompile(`\$ ?([0-9]+(?:\.[0-9]+)?)`)
|
||||
pattern := regexp.MustCompile(`\$? ?([0-9]+(?:\.[0-9]+)?)`)
|
||||
match := pattern.FindStringSubmatch(raw)
|
||||
if len(match) != 2 {
|
||||
return 0, false
|
||||
|
||||
Reference in New Issue
Block a user