mirror of
https://github.com/formbricks/formbricks.git
synced 2026-02-16 18:18:53 -06:00
fix: ai feature check (#4597)
Co-authored-by: Anshuman Pandey <54475686+pandeymangg@users.noreply.github.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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")
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user