mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00
4.8.10 test (#2433)
* perf: node template ui * perf: select tool path load error * pay i18n * i18n * perf: oneapi code * perf: doc * node templates * perf: usage table role * feat: count vector total by datasetId * perf: user select tip and tempalte market ui * i18n * perf: sso config tip
This commit is contained in:
@@ -30,7 +30,9 @@ export const UserSelectNode: FlowNodeTemplateType = {
|
||||
key: NodeInputKeyEnum.description,
|
||||
renderTypeList: [FlowNodeInputTypeEnum.textarea],
|
||||
valueType: WorkflowIOValueTypeEnum.string,
|
||||
label: i18nT('app:workflow.select_description')
|
||||
label: i18nT('app:workflow.select_description'),
|
||||
description: i18nT('app:workflow.select_description_tip'),
|
||||
placeholder: i18nT('app:workflow.select_description_placeholder')
|
||||
},
|
||||
{
|
||||
key: NodeInputKeyEnum.userSelectOptions,
|
||||
|
1
packages/global/core/workflow/type/node.d.ts
vendored
1
packages/global/core/workflow/type/node.d.ts
vendored
@@ -80,6 +80,7 @@ export type NodeTemplateListItemType = {
|
||||
name: string;
|
||||
intro?: string; // template list intro
|
||||
isTool?: boolean;
|
||||
authorAvatar?: string;
|
||||
author?: string;
|
||||
unique?: boolean; // 唯一的
|
||||
currentCost?: number; // 当前积分消耗
|
||||
|
@@ -20,6 +20,7 @@ export const deleteDatasetDataVector = Vector.delete;
|
||||
export const recallFromVectorStore = Vector.embRecall;
|
||||
export const getVectorDataByTime = Vector.getVectorDataByTime;
|
||||
export const getVectorCountByTeamId = Vector.getVectorCountByTeamId;
|
||||
export const getVectorCountByDatasetId = Vector.getVectorCountByDatasetId;
|
||||
|
||||
export const insertDatasetDataVector = async ({
|
||||
model,
|
||||
|
@@ -297,6 +297,20 @@ export class MilvusCtrl {
|
||||
|
||||
return total;
|
||||
};
|
||||
getVectorCountByDatasetId = async (teamId: string, datasetId: string) => {
|
||||
const client = await this.getClient();
|
||||
|
||||
const result = await client.query({
|
||||
collection_name: DatasetVectorTableName,
|
||||
output_fields: ['count(*)'],
|
||||
filter: `(teamId == "${String(teamId)}") and (dataset == "${String(datasetId)}")`
|
||||
});
|
||||
|
||||
const total = result.data?.[0]?.['count(*)'] as number;
|
||||
|
||||
return total;
|
||||
};
|
||||
|
||||
getVectorDataByTime = async (start: Date, end: Date) => {
|
||||
const client = await this.getClient();
|
||||
const startTimestamp = new Date(start).getTime();
|
||||
|
@@ -205,13 +205,6 @@ export class PgVectorCtrl {
|
||||
});
|
||||
}
|
||||
};
|
||||
getVectorCountByTeamId = async (teamId: string) => {
|
||||
const total = await PgClient.count(DatasetVectorTableName, {
|
||||
where: [['team_id', String(teamId)]]
|
||||
});
|
||||
|
||||
return total;
|
||||
};
|
||||
getVectorDataByTime = async (start: Date, end: Date) => {
|
||||
const { rows } = await PgClient.query<{
|
||||
id: string;
|
||||
@@ -230,4 +223,18 @@ export class PgVectorCtrl {
|
||||
datasetId: item.dataset_id
|
||||
}));
|
||||
};
|
||||
getVectorCountByTeamId = async (teamId: string) => {
|
||||
const total = await PgClient.count(DatasetVectorTableName, {
|
||||
where: [['team_id', String(teamId)]]
|
||||
});
|
||||
|
||||
return total;
|
||||
};
|
||||
getVectorCountByDatasetId = async (teamId: string, datasetId: string) => {
|
||||
const total = await PgClient.count(DatasetVectorTableName, {
|
||||
where: [['team_id', String(teamId)], 'and', ['dataset_id', String(datasetId)]]
|
||||
});
|
||||
|
||||
return total;
|
||||
};
|
||||
}
|
||||
|
@@ -112,7 +112,7 @@ export const dispatchChatCompletion = async (props: ChatProps): Promise<ChatResp
|
||||
systemPrompt,
|
||||
stringQuoteText
|
||||
}),
|
||||
(async () => {
|
||||
(() => {
|
||||
// censor model and system key
|
||||
if (modelConstantsData.censor && !user.openaiAccount?.key) {
|
||||
return postTextCensor({
|
||||
|
@@ -469,7 +469,7 @@ export async function dispatchWorkFlow(data: Props): Promise<DispatchFlowRespons
|
||||
|
||||
// start process width initInput
|
||||
const entryNodes = runtimeNodes.filter((item) => item.isEntry);
|
||||
console.log(runtimeEdges);
|
||||
|
||||
// reset entry
|
||||
// runtimeNodes.forEach((item) => {
|
||||
// item.isEntry = false;
|
||||
|
@@ -31,6 +31,7 @@ const FillRowTabs = ({ list, value, onChange, py = '7px', px = '12px', ...props
|
||||
key={item.value}
|
||||
flex={'1 0 0'}
|
||||
alignItems={'center'}
|
||||
justifyContent={'center'}
|
||||
cursor={'pointer'}
|
||||
borderRadius={'md'}
|
||||
px={px}
|
||||
|
@@ -176,6 +176,8 @@
|
||||
"read_files_result_desc": "The original text of the document consists of the file name and the document content. Multiple files are separated by horizontal lines.",
|
||||
"read_files_tip": "Parse all uploaded documents in the conversation and return the corresponding document content",
|
||||
"select_description": "Select description",
|
||||
"select_description_placeholder": "For example: \n\nAre there any tomatoes in the refrigerator?",
|
||||
"select_description_tip": "You can add a descriptive text to explain to users what each option represents.",
|
||||
"select_result": "Select result",
|
||||
"template": {
|
||||
"communication": "Communication"
|
||||
|
@@ -881,11 +881,11 @@
|
||||
"AI function": "AI function",
|
||||
"AI response switch tip": "If you wish the current node not to output content, you can turn off this switch. AI output content will not be displayed to the user, you can manually use 'AI response content' for special processing.",
|
||||
"AI support tool tip": "Supports function calls model, can better use tool invocation.",
|
||||
"Basic Node": "Basic function",
|
||||
"Basic Node": "Basic",
|
||||
"Query extension": "Question optimization",
|
||||
"System Plugin": "System plugin",
|
||||
"System Plugin": "System",
|
||||
"System input module": "System input",
|
||||
"Team Plugin": "Team plugin",
|
||||
"Team Plugin": "Team",
|
||||
"Tool module": "Tool",
|
||||
"UnKnow Module": "Unknown module",
|
||||
"http body placeholder": "Same syntax as APIFox"
|
||||
@@ -1091,6 +1091,7 @@
|
||||
"confirm_pay": "confirm payment",
|
||||
"get_pay_QR": "Get the recharge QR code",
|
||||
"need_pay": "Need to pay",
|
||||
"need_to_pay": "Actually paid",
|
||||
"new_package_price": "New package price",
|
||||
"notice": "Do not close the page",
|
||||
"old_package_price": "Old package price",
|
||||
|
@@ -154,6 +154,8 @@
|
||||
"read_files_result_desc": "文档原文,由文件名和文档内容组成,多个文件之间通过横线隔开。",
|
||||
"read_files_tip": "解析对话中所有上传的文档,并返回对应文档内容",
|
||||
"select_description": "说明文字",
|
||||
"select_description_placeholder": "例如: \n冰箱里是否有西红柿?",
|
||||
"select_description_tip": "你可以添加一段说明文字,用以向用户说明每个选项代表的含义。",
|
||||
"select_result": "选择的结果",
|
||||
"template": {
|
||||
"communication": "通信"
|
||||
|
@@ -19,9 +19,6 @@
|
||||
"package_overlay_a": "可以的。每次购买的资源包都是独立的,在其有效期内将会叠加使用。AI积分会优先扣除最先过期的资源包。",
|
||||
"package_overlay_q": "额外资源包可以叠加么?"
|
||||
},
|
||||
"yes": "是",
|
||||
"no": "否",
|
||||
"back": "返回",
|
||||
"Folder": "文件夹",
|
||||
"Login": "登录",
|
||||
"Move": "移动",
|
||||
@@ -32,6 +29,7 @@
|
||||
"UnKnow": "未知",
|
||||
"Warning": "提示",
|
||||
"add_new": "新增",
|
||||
"back": "返回",
|
||||
"chose_condition": "选择条件",
|
||||
"chosen": "已选",
|
||||
"classification": "分类",
|
||||
@@ -138,7 +136,6 @@
|
||||
"Detail": "详情",
|
||||
"Documents": "文档",
|
||||
"Done": "完成",
|
||||
"have_done": "已完成",
|
||||
"Edit": "编辑",
|
||||
"Exit": "退出",
|
||||
"Expired Time": "过期时间",
|
||||
@@ -194,11 +191,7 @@
|
||||
"Set Name": "取个名字",
|
||||
"Setting": "设置",
|
||||
"Status": "状态",
|
||||
"submitting": "提交中",
|
||||
"submit_success": "提交成功",
|
||||
"Submit failed": "提交失败",
|
||||
"submitted": "已提交",
|
||||
|
||||
"Success": "成功",
|
||||
"Sync success": "同步成功",
|
||||
"Team": "团队",
|
||||
@@ -247,6 +240,7 @@
|
||||
"empty": "这个目录已经没东西可选了~",
|
||||
"open_dataset": "打开知识库"
|
||||
},
|
||||
"have_done": "已完成",
|
||||
"input": {
|
||||
"Repeat Value": "有重复的值"
|
||||
},
|
||||
@@ -268,6 +262,9 @@
|
||||
"error tip": "语音转文字失败",
|
||||
"not support": "您的浏览器不支持语音输入"
|
||||
},
|
||||
"submit_success": "提交成功",
|
||||
"submitted": "已提交",
|
||||
"submitting": "提交中",
|
||||
"support": "支持",
|
||||
"system": {
|
||||
"Commercial version function": "请升级商业版后使用该功能:https://fastgpt.in",
|
||||
@@ -1065,7 +1062,7 @@
|
||||
"include": "包含标准套餐与额外资源包",
|
||||
"node_info": "调整该模块会对工具调用时机有影响。\n你可以通过精确的描述该模块功能,引导模型进行工具调用。",
|
||||
"old_version_attention": "检测到您的高级编排为旧版,系统将为您自动格式化成新版工作流。\n\n由于版本差异较大,会导致一些工作流无法正常排布,请重新手动连接工作流。如仍异常,可尝试删除对应节点后重新添加。\n\n你可以直接点击调试进行工作流测试,调试完毕后点击发布。直到你点击发布,新工作流才会真正保存生效。\n\n在你发布新工作流前,自动保存不会生效。",
|
||||
"open_api_notice": "可以填写 OpenAI/OneAPI的相关秘钥。如果你填写了该内容,在线上平台使用【AI对话】、【问题分类】和【内容提取】将会走你填写的Key,不会计费。请注意你的Key 是否有访问对应模型的权限。GPT模型可以选择 FastAI。",
|
||||
"open_api_notice": "可以填写 OpenAI/OneAPI的相关密钥。如果你填写了该内容,在线上平台使用【AI对话】、【问题分类】和【内容提取】将会走你填写的Key,不会计费。请注意你的Key 是否有访问对应模型的权限。GPT模型可以选择 FastAI。",
|
||||
"open_api_placeholder": "请求地址,默认为 openai 官方。可填中转地址,未自动补全 \"v1\"",
|
||||
"resource": "资源用量"
|
||||
},
|
||||
@@ -1082,6 +1079,7 @@
|
||||
"Tools": "工具"
|
||||
},
|
||||
"new_create": "新建",
|
||||
"no": "否",
|
||||
"no_data": "暂无数据",
|
||||
"no_laf_env": "系统未配置Laf环境",
|
||||
"not_yet_introduced": "暂无介绍",
|
||||
@@ -1093,9 +1091,10 @@
|
||||
"confirm_pay": "确认支付",
|
||||
"get_pay_QR": "获取充值二维码",
|
||||
"need_pay": "需支付",
|
||||
"need_to_pay": "实付",
|
||||
"new_package_price": "新套餐价格",
|
||||
"notice": "请勿关闭页面",
|
||||
"old_package_price": "旧套餐价格",
|
||||
"old_package_price": "旧套餐余额",
|
||||
"other": "其他金额,请取整数",
|
||||
"to_recharge": "余额不足,去充值",
|
||||
"wechat": "请微信扫码支付: {{price}}元,请勿关闭页面",
|
||||
@@ -1162,10 +1161,10 @@
|
||||
},
|
||||
"openapi": {
|
||||
"Api baseurl": "API 根地址",
|
||||
"Api manager": "API 秘钥管理",
|
||||
"Api manager": "API 密钥管理",
|
||||
"Copy success": "已复制 API 地址",
|
||||
"New api key": "新的 API 秘钥",
|
||||
"New api key tip": "请保管好你的秘钥,秘钥不会再次展示~"
|
||||
"New api key": "新的 API 密钥",
|
||||
"New api key tip": "请保管好你的密钥,密钥不会再次展示~"
|
||||
},
|
||||
"outlink": {
|
||||
"Delete link tip": "确认删除该免登录链接?删除后,该链接将会立即失效,对话日志仍会保留,请确认!",
|
||||
@@ -1243,16 +1242,7 @@
|
||||
"Ai point every thousand tokens": "{{points}} 积分/1K tokens",
|
||||
"Amount": "金额",
|
||||
"Bills": "账单与开票",
|
||||
"invoicing": "开票",
|
||||
"invoice_amount": "开票金额",
|
||||
"bill_detail": "账单详情",
|
||||
"billable_invoice": "可开票账单",
|
||||
"apply_invoice": "申请开票",
|
||||
"Buy": "购买",
|
||||
"invoice_detail": "发票详情",
|
||||
"invoice_info": "发票将在 3-7 个工作日内发送至邮箱,请耐心等待",
|
||||
"no_invoice": "暂无开票记录",
|
||||
"has_invoice": "是否已开票",
|
||||
"Confirm pay": "支付确认",
|
||||
"Not sufficient": "您的 AI 积分不足,请先升级套餐或购买额外 AI 积分后继续使用。",
|
||||
"Plan expired time": "套餐到期时间",
|
||||
@@ -1260,23 +1250,7 @@
|
||||
"Standard Plan Detail": "套餐详情",
|
||||
"To read plan": "查看套餐",
|
||||
"amount_0": "购买数量不能为0",
|
||||
"use_default": "使用默认抬头",
|
||||
"bill_tag": {
|
||||
"bill": "账单记录",
|
||||
"invoice": "开票记录",
|
||||
"default_header": "默认抬头"
|
||||
},
|
||||
"invoice_data": {
|
||||
"organization_name": "组织名称",
|
||||
"unit_code": "统一信用代码",
|
||||
"company_address": "公司地址",
|
||||
"company_phone": "公司电话",
|
||||
"bank": "开户银行",
|
||||
"bank_account": "开户账号",
|
||||
"need_special_invoice": "是否需要专票",
|
||||
"email": "邮箱地址",
|
||||
"in_valid": "存在空字段或邮箱格式错误"
|
||||
},
|
||||
"apply_invoice": "申请开票",
|
||||
"bill": {
|
||||
"Number": "订单号",
|
||||
"Status": "状态",
|
||||
@@ -1293,12 +1267,36 @@
|
||||
"success": "支付成功"
|
||||
}
|
||||
},
|
||||
"bill_detail": "账单详情",
|
||||
"bill_tag": {
|
||||
"bill": "账单记录",
|
||||
"default_header": "默认抬头",
|
||||
"invoice": "开票记录"
|
||||
},
|
||||
"billable_invoice": "可开票账单",
|
||||
"buy_resource": "购买资源包",
|
||||
"has_invoice": "是否已开票",
|
||||
"invoice_amount": "开票金额",
|
||||
"invoice_data": {
|
||||
"bank": "开户银行",
|
||||
"bank_account": "开户账号",
|
||||
"company_address": "公司地址",
|
||||
"company_phone": "公司电话",
|
||||
"email": "邮箱地址",
|
||||
"in_valid": "存在空字段或邮箱格式错误",
|
||||
"need_special_invoice": "是否需要专票",
|
||||
"organization_name": "组织名称",
|
||||
"unit_code": "统一信用代码"
|
||||
},
|
||||
"invoice_detail": "发票详情",
|
||||
"invoice_info": "发票将在 3-7 个工作日内发送至邮箱,请耐心等待",
|
||||
"invoicing": "开票",
|
||||
"moduleName": {
|
||||
"index": "索引生成",
|
||||
"qa": "QA 拆分"
|
||||
},
|
||||
"noBill": "无账单记录~",
|
||||
"no_invoice": "暂无开票记录",
|
||||
"subscription": {
|
||||
"AI points": "AI 积分",
|
||||
"AI points click to read tip": "每次调用 AI 模型时,都会消耗一定的 AI 积分(类似于 token)。点击可查看详细计算规则。",
|
||||
@@ -1322,8 +1320,6 @@
|
||||
"Sub plan tip": "免费使用 {{title}} 或升级更高的套餐",
|
||||
"Team plan and usage": "套餐与用量",
|
||||
"Training weight": "训练优先级:{{weight}}",
|
||||
"web_site_sync": "Web 站点同步",
|
||||
"rerank": "检索结果重排",
|
||||
"Update extra ai points": "额外 AI 积分",
|
||||
"Update extra dataset size": "额外存储量",
|
||||
"Upgrade plan": "升级套餐",
|
||||
@@ -1343,6 +1339,7 @@
|
||||
"Year sale": "赠送两个月"
|
||||
},
|
||||
"point": "积分",
|
||||
"rerank": "检索结果重排",
|
||||
"standardSubLevel": {
|
||||
"enterprise": "企业版",
|
||||
"experience": "体验版",
|
||||
@@ -1356,7 +1353,8 @@
|
||||
"extraDatasetSize": "知识库扩容",
|
||||
"extraPoints": "AI 积分套餐",
|
||||
"standard": "套餐订阅"
|
||||
}
|
||||
},
|
||||
"web_site_sync": "Web 站点同步"
|
||||
},
|
||||
"usage": {
|
||||
"Ai model": "AI 模型",
|
||||
@@ -1374,7 +1372,8 @@
|
||||
"Total points": "AI 积分消耗",
|
||||
"Usage Detail": "使用详情",
|
||||
"Whisper": "语音输入"
|
||||
}
|
||||
},
|
||||
"use_default": "使用默认抬头"
|
||||
}
|
||||
},
|
||||
"sync_link": "同步链接",
|
||||
@@ -1434,7 +1433,7 @@
|
||||
"Update password successful": "修改密码成功",
|
||||
"Usage Record": "使用记录",
|
||||
"apikey": {
|
||||
"key": "API 秘钥"
|
||||
"key": "API 密钥"
|
||||
},
|
||||
"confirm_password": "确认密码",
|
||||
"new_password": "新密码",
|
||||
@@ -1494,5 +1493,6 @@
|
||||
"type": "类型"
|
||||
},
|
||||
"verification": "验证",
|
||||
"xx_search_result": "{{key}} 的搜索结果"
|
||||
"xx_search_result": "{{key}} 的搜索结果",
|
||||
"yes": "是"
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@
|
||||
"feishu_bot_desc": "通过 API 直接接入飞书机器人",
|
||||
"feishu_name": "飞书",
|
||||
"key_alias": "key 的别名,仅用于展示",
|
||||
"key_tips": "你可以使用 API 秘钥访问一些特定的接口(无法访问应用,访问应用需使用应用内的 API key)",
|
||||
"key_tips": "你可以使用 API 密钥访问一些特定的接口(无法访问应用,访问应用需使用应用内的 API key)",
|
||||
"link_name": "分享链接的名字",
|
||||
"new_feishu_bot": "新增飞书机器人",
|
||||
"official_account": {
|
||||
|
Reference in New Issue
Block a user