fix: ai feature check (#4597)

Co-authored-by: Anshuman Pandey <54475686+pandeymangg@users.noreply.github.com>
This commit is contained in:
Piyush Gupta
2025-01-15 10:42:02 +05:30
committed by GitHub
parent dfbec20016
commit 8399391aaa
2 changed files with 2 additions and 8 deletions

View File

@@ -376,12 +376,7 @@ export const getIsOrganizationAIReady = async (billingPlan: TOrganizationBilling
const license = await getEnterpriseLicense();
if (IS_FORMBRICKS_CLOUD) {
return Boolean(
license.features?.ai &&
(billingPlan === PROJECT_FEATURE_KEYS.STARTUP ||
billingPlan === PROJECT_FEATURE_KEYS.SCALE ||
billingPlan === PROJECT_FEATURE_KEYS.ENTERPRISE)
);
return Boolean(license.features?.ai && billingPlan !== PROJECT_FEATURE_KEYS.FREE);
}
return Boolean(license.features?.ai);

View File

@@ -1,5 +1,5 @@
import { TOrganization } from "@formbricks/types/organizations";
import { IS_AI_CONFIGURED, IS_FORMBRICKS_CLOUD } from "../constants";
import { IS_AI_CONFIGURED } from "../constants";
export const getPromptText = (questionHeadline: string, response: string) => {
return `**${questionHeadline.trim()}**\n${response.trim()}`;
@@ -11,7 +11,6 @@ export const getIsAIEnabled = async (organization: TOrganization) => {
return Boolean(
organization.isAIEnabled &&
IS_AI_CONFIGURED &&
IS_FORMBRICKS_CLOUD &&
(billingPlan === "startup" || billingPlan === "scale" || billingPlan === "enterprise")
);
};