mirror of
https://git.mirrors.martin98.com/https://github.com/langgenius/dify.git
synced 2025-08-14 23:15:59 +08:00
feat: update pricing (#1749)
This commit is contained in:
parent
5beb298e47
commit
b5b20234e9
@ -36,7 +36,7 @@ const Tooltip: FC< TooltipProps> = ({
|
|||||||
{children}
|
{children}
|
||||||
</PortalToFollowElemTrigger>
|
</PortalToFollowElemTrigger>
|
||||||
<PortalToFollowElemContent
|
<PortalToFollowElemContent
|
||||||
className="z-[999]"
|
className="z-[9999]"
|
||||||
>
|
>
|
||||||
<div className='relative px-3 py-2 text-xs font-normal text-gray-700 bg-white rounded-md shadow-lg'>
|
<div className='relative px-3 py-2 text-xs font-normal text-gray-700 bg-white rounded-md shadow-lg'>
|
||||||
{popupContent}
|
{popupContent}
|
||||||
|
@ -13,9 +13,11 @@ export const ALL_PLANS: Record<Plan, PlanInfo> = {
|
|||||||
modelProviders: supportModelProviders,
|
modelProviders: supportModelProviders,
|
||||||
teamMembers: 1,
|
teamMembers: 1,
|
||||||
buildApps: 10,
|
buildApps: 10,
|
||||||
vectorSpace: 10,
|
vectorSpace: 5,
|
||||||
documentProcessingPriority: Priority.standard,
|
documentProcessingPriority: Priority.standard,
|
||||||
logHistory: 30,
|
logHistory: 30,
|
||||||
|
messageRequest: 500,
|
||||||
|
annotatedResponse: 10,
|
||||||
},
|
},
|
||||||
professional: {
|
professional: {
|
||||||
level: 2,
|
level: 2,
|
||||||
@ -26,6 +28,8 @@ export const ALL_PLANS: Record<Plan, PlanInfo> = {
|
|||||||
vectorSpace: 200,
|
vectorSpace: 200,
|
||||||
documentProcessingPriority: Priority.priority,
|
documentProcessingPriority: Priority.priority,
|
||||||
logHistory: NUM_INFINITE,
|
logHistory: NUM_INFINITE,
|
||||||
|
messageRequest: NUM_INFINITE,
|
||||||
|
annotatedResponse: 2000,
|
||||||
},
|
},
|
||||||
team: {
|
team: {
|
||||||
level: 3,
|
level: 3,
|
||||||
@ -36,6 +40,8 @@ export const ALL_PLANS: Record<Plan, PlanInfo> = {
|
|||||||
vectorSpace: 1000,
|
vectorSpace: 1000,
|
||||||
documentProcessingPriority: Priority.topPriority,
|
documentProcessingPriority: Priority.topPriority,
|
||||||
logHistory: NUM_INFINITE,
|
logHistory: NUM_INFINITE,
|
||||||
|
messageRequest: NUM_INFINITE,
|
||||||
|
annotatedResponse: 5000,
|
||||||
},
|
},
|
||||||
enterprise: {
|
enterprise: {
|
||||||
level: 4,
|
level: 4,
|
||||||
@ -46,6 +52,8 @@ export const ALL_PLANS: Record<Plan, PlanInfo> = {
|
|||||||
vectorSpace: NUM_INFINITE,
|
vectorSpace: NUM_INFINITE,
|
||||||
documentProcessingPriority: Priority.topPriority,
|
documentProcessingPriority: Priority.topPriority,
|
||||||
logHistory: NUM_INFINITE,
|
logHistory: NUM_INFINITE,
|
||||||
|
messageRequest: NUM_INFINITE,
|
||||||
|
annotatedResponse: NUM_INFINITE,
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,7 +6,9 @@ import cn from 'classnames'
|
|||||||
import { Plan } from '../type'
|
import { Plan } from '../type'
|
||||||
import { ALL_PLANS, NUM_INFINITE, contactSalesUrl } from '../config'
|
import { ALL_PLANS, NUM_INFINITE, contactSalesUrl } from '../config'
|
||||||
import Toast from '../../base/toast'
|
import Toast from '../../base/toast'
|
||||||
|
import TooltipPlus from '../../base/tooltip-plus'
|
||||||
import { PlanRange } from './select-plan-range'
|
import { PlanRange } from './select-plan-range'
|
||||||
|
import { HelpCircle } from '@/app/components/base/icons/src/vender/line/general'
|
||||||
import { useAppContext } from '@/context/app-context'
|
import { useAppContext } from '@/context/app-context'
|
||||||
import { fetchSubscriptionUrls } from '@/service/billing'
|
import { fetchSubscriptionUrls } from '@/service/billing'
|
||||||
|
|
||||||
@ -16,10 +18,21 @@ type Props = {
|
|||||||
planRange: PlanRange
|
planRange: PlanRange
|
||||||
}
|
}
|
||||||
|
|
||||||
const KeyValue = ({ label, value }: { label: string; value: string | number | JSX.Element }) => {
|
const KeyValue = ({ label, value, tooltip }: { label: string; value: string | number | JSX.Element; tooltip?: string }) => {
|
||||||
return (
|
return (
|
||||||
<div className='mt-3.5 leading-[125%] text-[13px] font-medium'>
|
<div className='mt-3.5 leading-[125%] text-[13px] font-medium'>
|
||||||
<div className='text-gray-500'>{label}</div>
|
<div className='flex items-center text-gray-500 space-x-1'>
|
||||||
|
<div>{label}</div>
|
||||||
|
{tooltip && (
|
||||||
|
<TooltipPlus
|
||||||
|
popupContent={
|
||||||
|
<div className='w-[200px]'>{tooltip}</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<HelpCircle className='w-3 h-3 text-gray-400' />
|
||||||
|
</TooltipPlus>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
<div className='mt-0.5 text-gray-900'>{value}</div>
|
<div className='mt-0.5 text-gray-900'>{value}</div>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
@ -84,7 +97,33 @@ const PlanItem: FC<Props> = ({
|
|||||||
case Plan.sandbox:
|
case Plan.sandbox:
|
||||||
return t('billing.plansCommon.supportItems.communityForums')
|
return t('billing.plansCommon.supportItems.communityForums')
|
||||||
case Plan.professional:
|
case Plan.professional:
|
||||||
return t('billing.plansCommon.supportItems.emailSupport')
|
return (
|
||||||
|
<div>
|
||||||
|
<div>{t('billing.plansCommon.supportItems.emailSupport')}</div>
|
||||||
|
<div className='mt-3.5 flex items-center space-x-1'>
|
||||||
|
<div>+ {t('billing.plansCommon.supportItems.logoChange')}</div>
|
||||||
|
<div>{comingSoon}</div>
|
||||||
|
</div>
|
||||||
|
<div className='mt-3.5 flex items-center space-x-1'>
|
||||||
|
<div className='flex items-center'>
|
||||||
|
+
|
||||||
|
<div className='mr-0.5'> {t('billing.plansCommon.supportItems.ragAPIRequest')}</div>
|
||||||
|
<TooltipPlus
|
||||||
|
popupContent={
|
||||||
|
<div className='w-[200px]'>{t('billing.plansCommon.ragAPIRequestTooltip')}</div>
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<HelpCircle className='w-3 h-3 text-gray-400' />
|
||||||
|
</TooltipPlus>
|
||||||
|
</div>
|
||||||
|
<div>{comingSoon}</div>
|
||||||
|
</div>
|
||||||
|
<div className='mt-3.5 flex items-center space-x-1'>
|
||||||
|
<div>+ {t('billing.plansCommon.supportItems.agentModel')}</div>
|
||||||
|
<div>{comingSoon}</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)
|
||||||
case Plan.team:
|
case Plan.team:
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@ -94,7 +133,7 @@ const PlanItem: FC<Props> = ({
|
|||||||
<div>{comingSoon}</div>
|
<div>{comingSoon}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className='mt-3.5 flex items-center space-x-1'>
|
<div className='mt-3.5 flex items-center space-x-1'>
|
||||||
<div>+ {t('billing.plansCommon.supportItems.personalizedSupport')}</div>
|
<div>+ {t('billing.plansCommon.supportItems.SSOAuthentication')}</div>
|
||||||
<div>{comingSoon}</div>
|
<div>{comingSoon}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -103,9 +142,6 @@ const PlanItem: FC<Props> = ({
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<div>{t('billing.plansCommon.supportItems.personalizedSupport')}</div>
|
<div>{t('billing.plansCommon.supportItems.personalizedSupport')}</div>
|
||||||
<div className='mt-3.5 flex items-center space-x-1'>
|
|
||||||
<div>+ {t('billing.plansCommon.supportItems.dedicatedAPISupport')}</div>
|
|
||||||
</div>
|
|
||||||
<div className='mt-3.5 flex items-center space-x-1'>
|
<div className='mt-3.5 flex items-center space-x-1'>
|
||||||
<div>+ {t('billing.plansCommon.supportItems.customIntegration')}</div>
|
<div>+ {t('billing.plansCommon.supportItems.customIntegration')}</div>
|
||||||
</div>
|
</div>
|
||||||
@ -149,11 +185,11 @@ const PlanItem: FC<Props> = ({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return (
|
return (
|
||||||
<div className={cn(isMostPopularPlan ? 'bg-[#0086C9] p-0.5' : 'pt-7', 'flex flex-col min-w-[290px] w-[290px] h-[712px] rounded-xl')}>
|
<div className={cn(isMostPopularPlan ? 'bg-[#0086C9] p-0.5' : 'pt-7', 'flex flex-col min-w-[290px] w-[290px] rounded-xl')}>
|
||||||
{isMostPopularPlan && (
|
{isMostPopularPlan && (
|
||||||
<div className='flex items-center h-7 justify-center leading-[12px] text-xs font-medium text-[#F5F8FF]'>{t('billing.plansCommon.mostPopular')}</div>
|
<div className='flex items-center h-7 justify-center leading-[12px] text-xs font-medium text-[#F5F8FF]'>{t('billing.plansCommon.mostPopular')}</div>
|
||||||
)}
|
)}
|
||||||
<div className={cn(style[plan].bg, 'grow px-6 pt-6 rounded-[10px]')}>
|
<div className={cn(style[plan].bg, 'grow px-6 py-6 rounded-[10px]')}>
|
||||||
<div className={cn(style[plan].title, 'mb-1 leading-[125%] text-lg font-semibold')}>{t(`${i18nPrefix}.name`)}</div>
|
<div className={cn(style[plan].title, 'mb-1 leading-[125%] text-lg font-semibold')}>{t(`${i18nPrefix}.name`)}</div>
|
||||||
<div className={cn(isFreePlan ? 'text-[#FB6514]' : 'text-gray-500', 'mb-4 h-8 leading-[125%] text-[13px] font-normal')}>{t(`${i18nPrefix}.description`)}</div>
|
<div className={cn(isFreePlan ? 'text-[#FB6514]' : 'text-gray-500', 'mb-4 h-8 leading-[125%] text-[13px] font-normal')}>{t(`${i18nPrefix}.description`)}</div>
|
||||||
|
|
||||||
@ -201,11 +237,22 @@ const PlanItem: FC<Props> = ({
|
|||||||
<KeyValue
|
<KeyValue
|
||||||
label={t('billing.plansCommon.vectorSpace')}
|
label={t('billing.plansCommon.vectorSpace')}
|
||||||
value={planInfo.vectorSpace === NUM_INFINITE ? t('billing.plansCommon.unlimited') as string : (planInfo.vectorSpace >= 1000 ? `${planInfo.vectorSpace / 1000}G` : `${planInfo.vectorSpace}MB`)}
|
value={planInfo.vectorSpace === NUM_INFINITE ? t('billing.plansCommon.unlimited') as string : (planInfo.vectorSpace >= 1000 ? `${planInfo.vectorSpace / 1000}G` : `${planInfo.vectorSpace}MB`)}
|
||||||
|
tooltip={t('billing.plansCommon.vectorSpaceBillingTooltip') as string}
|
||||||
/>
|
/>
|
||||||
<KeyValue
|
<KeyValue
|
||||||
label={t('billing.plansCommon.documentProcessingPriority')}
|
label={t('billing.plansCommon.documentProcessingPriority')}
|
||||||
value={t(`billing.plansCommon.priority.${planInfo.documentProcessingPriority}`) as string}
|
value={t(`billing.plansCommon.priority.${planInfo.documentProcessingPriority}`) as string}
|
||||||
/>
|
/>
|
||||||
|
<KeyValue
|
||||||
|
label={t('billing.plansCommon.messageRequest.title')}
|
||||||
|
value={planInfo.messageRequest === NUM_INFINITE ? t('billing.plansCommon.unlimited') as string : `${planInfo.messageRequest} ${t('billing.plansCommon.messageRequest.unit')}`}
|
||||||
|
tooltip={t('billing.plansCommon.messageRequest.tooltip') as string}
|
||||||
|
/>
|
||||||
|
<KeyValue
|
||||||
|
label={t('billing.plansCommon.annotatedResponse.title')}
|
||||||
|
value={planInfo.annotatedResponse === NUM_INFINITE ? t('billing.plansCommon.unlimited') as string : `${planInfo.annotatedResponse}`}
|
||||||
|
tooltip={t('billing.plansCommon.annotatedResponse.tooltip') as string}
|
||||||
|
/>
|
||||||
<KeyValue
|
<KeyValue
|
||||||
label={t('billing.plansCommon.logsHistory')}
|
label={t('billing.plansCommon.logsHistory')}
|
||||||
value={planInfo.logHistory === NUM_INFINITE ? t('billing.plansCommon.unlimited') as string : `${planInfo.logHistory} ${t('billing.plansCommon.days')}`}
|
value={planInfo.logHistory === NUM_INFINITE ? t('billing.plansCommon.unlimited') as string : `${planInfo.logHistory} ${t('billing.plansCommon.days')}`}
|
||||||
|
@ -19,6 +19,8 @@ export type PlanInfo = {
|
|||||||
vectorSpace: number
|
vectorSpace: number
|
||||||
documentProcessingPriority: Priority
|
documentProcessingPriority: Priority
|
||||||
logHistory: number
|
logHistory: number
|
||||||
|
messageRequest: number
|
||||||
|
annotatedResponse: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UsagePlanInfo = Pick<PlanInfo, 'vectorSpace' | 'buildApps' | 'teamMembers'>
|
export type UsagePlanInfo = Pick<PlanInfo, 'vectorSpace' | 'buildApps' | 'teamMembers'>
|
||||||
|
@ -28,6 +28,7 @@ const translation = {
|
|||||||
teamMembers: 'Team Members',
|
teamMembers: 'Team Members',
|
||||||
buildApps: 'Build Apps',
|
buildApps: 'Build Apps',
|
||||||
vectorSpace: 'Vector Space',
|
vectorSpace: 'Vector Space',
|
||||||
|
vectorSpaceBillingTooltip: 'Each 1MB can store about 1.2million characters of vectorized data(estimated using OpenAI Embeddings, varies across models).',
|
||||||
vectorSpaceTooltip: 'Vector Space is the long-term memory system required for LLMs to comprehend your data.',
|
vectorSpaceTooltip: 'Vector Space is the long-term memory system required for LLMs to comprehend your data.',
|
||||||
documentProcessingPriority: 'Document Processing Priority',
|
documentProcessingPriority: 'Document Processing Priority',
|
||||||
documentProcessingPriorityTip: 'For higher document processing priority, please upgrade your plan.',
|
documentProcessingPriorityTip: 'For higher document processing priority, please upgrade your plan.',
|
||||||
@ -50,10 +51,22 @@ const translation = {
|
|||||||
personalizedSupport: 'Personalized support',
|
personalizedSupport: 'Personalized support',
|
||||||
dedicatedAPISupport: 'Dedicated API support',
|
dedicatedAPISupport: 'Dedicated API support',
|
||||||
customIntegration: 'Custom integration and support',
|
customIntegration: 'Custom integration and support',
|
||||||
|
ragAPIRequest: 'RAG API Requests',
|
||||||
|
agentModel: 'Agent Model',
|
||||||
},
|
},
|
||||||
comingSoon: 'Coming soon',
|
comingSoon: 'Coming soon',
|
||||||
member: 'Member',
|
member: 'Member',
|
||||||
memberAfter: 'Member',
|
memberAfter: 'Member',
|
||||||
|
messageRequest: {
|
||||||
|
title: 'Message Requests',
|
||||||
|
unit: 'per day',
|
||||||
|
tooltip: 'Includes all messages from your apps, whether via APIs or web sessions. (Not LLM resource usage)',
|
||||||
|
},
|
||||||
|
annotatedResponse: {
|
||||||
|
title: 'Annotation Quota Limits',
|
||||||
|
tooltip: 'Manual editing and annotation of responses provides customizable high-quality question-answering abilities for apps. (Applicable only in chat apps)',
|
||||||
|
},
|
||||||
|
ragAPIRequestTooltip: 'Refers to the number of API calls invoking only the knowledge base processing capabilities of Dify.',
|
||||||
},
|
},
|
||||||
plans: {
|
plans: {
|
||||||
sandbox: {
|
sandbox: {
|
||||||
|
@ -29,6 +29,7 @@ const translation = {
|
|||||||
buildApps: '构建应用程序数',
|
buildApps: '构建应用程序数',
|
||||||
vectorSpace: '向量空间',
|
vectorSpace: '向量空间',
|
||||||
vectorSpaceTooltip: '向量空间是 LLMs 理解您的数据所需的长期记忆系统。',
|
vectorSpaceTooltip: '向量空间是 LLMs 理解您的数据所需的长期记忆系统。',
|
||||||
|
vectorSpaceBillingTooltip: '向量存储是将知识库向量化处理后为让 LLMs 理解数据而使用的长期记忆存储,1MB 大约能满足1.2 million character 的向量化后数据存储(以 OpenAI Embedding 模型估算,不同模型计算方式有差异)。在向量化过程中,实际的压缩或尺寸减小取决于内容的复杂性和冗余性。',
|
||||||
documentProcessingPriority: '文档处理优先级',
|
documentProcessingPriority: '文档处理优先级',
|
||||||
documentProcessingPriorityTip: '如需更高的文档处理优先级,请升级您的套餐',
|
documentProcessingPriorityTip: '如需更高的文档处理优先级,请升级您的套餐',
|
||||||
documentProcessingPriorityUpgrade: '以更快的速度、更高的精度处理更多的数据。',
|
documentProcessingPriorityUpgrade: '以更快的速度、更高的精度处理更多的数据。',
|
||||||
@ -50,10 +51,22 @@ const translation = {
|
|||||||
personalizedSupport: '个性化支持',
|
personalizedSupport: '个性化支持',
|
||||||
dedicatedAPISupport: '专用 API 支持',
|
dedicatedAPISupport: '专用 API 支持',
|
||||||
customIntegration: '自定义集成和支持',
|
customIntegration: '自定义集成和支持',
|
||||||
|
ragAPIRequest: 'RAG API 请求',
|
||||||
|
agentModel: 'Agent 模型',
|
||||||
},
|
},
|
||||||
comingSoon: '即将推出',
|
comingSoon: '即将推出',
|
||||||
member: '成员',
|
member: '成员',
|
||||||
memberAfter: '个成员',
|
memberAfter: '个成员',
|
||||||
|
messageRequest: {
|
||||||
|
title: '信息限制',
|
||||||
|
unit: '条每天',
|
||||||
|
tooltip: '指每日应用会话调用 Dify API 的次数(而非 LLMs 的 API 资源调用),它包含你所有应用中通过 API 或者在 WebApp 会话中产生的消息数。',
|
||||||
|
},
|
||||||
|
annotatedResponse: {
|
||||||
|
title: '标注回复数',
|
||||||
|
tooltip: '标注回复功能通过人工编辑标注为应用提供了可定制的高质量问答回复能力',
|
||||||
|
},
|
||||||
|
ragAPIRequestTooltip: '指单独调用 Dify 知识库数据处理能力的 API。',
|
||||||
},
|
},
|
||||||
plans: {
|
plans: {
|
||||||
sandbox: {
|
sandbox: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user