fix(knowledge): 统一向量化费用归属说明
This commit is contained in:
@@ -6,7 +6,7 @@ import type { CloudApplication, CloudBudget, CloudCostPage, CloudCostSource } fr
|
||||
import { usePendingCloudInput } from './CloudPending';
|
||||
|
||||
const message = (e: unknown) => e instanceof Error ? e.message : '费用服务暂不可用';
|
||||
const sources: Record<CloudCostSource, string> = { self: '自己使用', shared: '分享', api: 'API', scheduled: '自动任务', preview: '草稿预览', knowledge: '知识库处理', channel: '微信渠道' };
|
||||
const sources: Record<CloudCostSource, string> = { self: '自己使用', shared: '分享', api: 'API', scheduled: '自动任务', preview: '草稿预览', knowledge: '知识库模型调用', channel: '微信渠道' };
|
||||
|
||||
export function CloudBudgetEditor({ slug }: { slug: string }) {
|
||||
const [budget, setBudget] = useState<CloudBudget | null>(null);
|
||||
@@ -24,7 +24,7 @@ export function CloudBudgetEditor({ slug }: { slug: string }) {
|
||||
}, [slug, accept]);
|
||||
return <section className="space-y-4 rounded-xl border border-border p-5">
|
||||
<h2 className="font-medium">费用上限</h2>
|
||||
<p className="text-sm leading-6 text-muted-foreground">这个智能体的自用、分享、API、微信渠道和自动任务共同计入。单次任务包含多轮模型调用及子智能体;知识库处理也计入费用。留空表示不设额外上限,填写 0 可暂停新增模型调用。</p>
|
||||
<p className="text-sm leading-6 text-muted-foreground">这个智能体的自用、分享、API、微信渠道和自动任务共同计入。单次任务包含多轮模型调用及子智能体;知识处理触发的对话模型调用仍按实际用量计入费用,embedding 向量化由平台承担,不计入用户用量、词元点数或智能体费用上限。留空表示不设额外上限,填写 0 可暂停新增模型调用。</p>
|
||||
<form className="flex flex-wrap items-end gap-4" onSubmit={async e => {
|
||||
e.preventDefault(); setBusy(true); setError('');
|
||||
try { accept(await cloudAgentsApi.call('saveBudget', { slug, request_limit_points: requestLimit.trim() || null, daily_limit_points: dailyLimit.trim() || null })); }
|
||||
|
||||
@@ -65,7 +65,7 @@ export function CloudKnowledgePanel({ slug, onCreated, onDeleted }: { slug: stri
|
||||
return <details className="rounded-lg border p-4">
|
||||
<summary className="min-h-8 cursor-pointer text-sm font-medium">管理我的知识文档</summary>
|
||||
<div className="mt-4 space-y-4 text-sm">
|
||||
<p className="text-xs leading-5 text-muted-foreground">上传到知识库的文档可供获准使用此智能体的人检索。解析后建立索引才会生效,向量调用扣除你的词元点数。</p>
|
||||
<p className="text-xs leading-5 text-muted-foreground">上传到知识库的文档可供获准使用此智能体的人检索。解析并建立索引后才会生效;embedding 向量化由平台承担,不计入用户用量、词元点数或智能体费用上限。知识处理如触发对话模型调用,仍按原模型实际用量计费。</p>
|
||||
{error && <p role="alert" className="text-destructive">{error}</p>}
|
||||
{catalogError && <p role="alert" className="text-destructive">知识库与模型目录加载失败:{catalogError}。请刷新重试。</p>}
|
||||
<div className="flex flex-wrap gap-2">
|
||||
@@ -85,7 +85,7 @@ export function CloudKnowledgePanel({ slug, onCreated, onDeleted }: { slug: stri
|
||||
{catalog?.models.map(m => <option key={m.id} value={m.id}>{m.name}</option>)}
|
||||
</select>
|
||||
{!catalogLoading && !catalogError && catalog && !catalog.models.length && <div className="space-y-2 text-xs leading-5 text-muted-foreground">
|
||||
<p>暂时没有可用的向量模型。请联系平台管理员在 Yuxi 完成配置,然后刷新。</p>
|
||||
<p>暂时没有可用的向量模型。Embedding 只在 Yuxi 配置,请联系平台管理员启用后刷新;向量化费用由平台承担,不计入用户用量或智能体费用上限。</p>
|
||||
<details>
|
||||
<summary className="cursor-pointer font-medium text-foreground">管理员配置说明</summary>
|
||||
<ol className="mt-2 list-decimal space-y-1 pl-5">
|
||||
|
||||
Reference in New Issue
Block a user