Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
hughcrt committed Jun 5, 2024
1 parent 8c05a52 commit 321b5e6
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ops
Submodule ops updated from 304150 to b33997
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"private": "true",
"scripts": {
"start": "concurrently -n frontend,backend \"npm run start:frontend\" \"npm run start:backend\"",
"start:with-ml": "concurrently -n frontend,backend,ml \"npm run start:frontend\" \"npm run start:backend\" \"npm run start:ml\"",
"start:frontend": "npm -w packages/frontend run start",
"start:backend": "npm -w packages/backend run start",
"start:radar": "npm -w packages/backend run start:radar",
Expand Down
5 changes: 4 additions & 1 deletion packages/backend/src/utils/playground.ts
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,10 @@ export async function runAImodel(
const [{ stripeCustomer }] =
await sql`select stripe_customer from org where id = ${orgId}`

if (process.env.NODE_ENV === "production") {
if (
process.env.NODE_ENV === "production" &&
process.env.STRIPE_SECRET_KEY
) {
stripe.billing.meterEvents
.create({
event_name: "ai_playground",
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/components/layout/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,14 @@ export default function Sidebar() {
icon: IconShieldBolt,
link: "/radars",
resource: "radars",
disabled: isSelfHosted ? org.license && !org.license.radarEnabled : false,
disabled: isSelfHosted ? org.license?.radarEnabled : false,
},
{
label: "Evaluations",
icon: IconFlask2Filled,
link: "/evaluations",
resource: "evaluations",
disabled: isSelfHosted ? org.license && !org.license.evalEnabled : false,
disabled: isSelfHosted ? org.license?.evalEnabled : false,
subMenu: [
{
label: "Playground",
Expand Down

0 comments on commit 321b5e6

Please sign in to comment.