Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide cost and usage in playground and evaluation when these are not specified #1607

4 changes: 2 additions & 2 deletions agenta-web/src/lib/helpers/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const intlNumber = new Intl.NumberFormat("en-US", {
const intlCurrency = new Intl.NumberFormat("en-US", {
style: "currency",
currency: "USD",
maximumFractionDigits: 4,
maximumFractionDigits: 6,
})

export const formatNumber = (value = 0) => {
Expand All @@ -14,7 +14,7 @@ export const formatNumber = (value = 0) => {

export const formatCurrency = (value: number) => {
bekossy marked this conversation as resolved.
Show resolved Hide resolved
if (value === 0) {
return "-"
return value
bekossy marked this conversation as resolved.
Show resolved Hide resolved
} else {
return intlCurrency.format(value)
}
Expand Down
Loading