mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-30 11:41:05 -05:00
9872d17abe
Co-authored-by: Johannes <johannes@formbricks.com> Co-authored-by: Piyush Gupta <piyushguptaa2z123@gmail.com> Co-authored-by: pandeymangg <anshuman.pandey9999@gmail.com>
16 lines
734 B
TypeScript
16 lines
734 B
TypeScript
import { TOrganizationBillingPlan } from "@formbricks/types/organizations";
|
|
import { IS_AI_CONFIGURED, IS_FORMBRICKS_CLOUD } from "../constants";
|
|
|
|
export const getPromptText = (questionHeadline: string, response: string) => {
|
|
return `**${questionHeadline}**\n${response}`;
|
|
};
|
|
|
|
export const getIsAIEnabled = async (billingPlan: TOrganizationBillingPlan) => {
|
|
// This is a temporary workaround to enable AI without checking the ee license validity, as the ee package is not available in the lib package.(but the billing plan check suffices the license check).
|
|
return Boolean(
|
|
IS_AI_CONFIGURED &&
|
|
IS_FORMBRICKS_CLOUD &&
|
|
(billingPlan === "startup" || billingPlan === "scale" || billingPlan === "enterprise")
|
|
);
|
|
};
|