feat: AI问答限定只答本站功能
- 前端发送全站工具清单(按分类,实时), 后端系统提示限定只答站内功能 - 范围外问题礼貌拒绝并引导站内工具 - About功能介绍同步 验证: 站内OCR问题正常答; 站外写代码被拒并引导 ✓ CHANGELOG记录
This commit is contained in:
1 parent
baa17ec08b
commit
e9a7dcac15
4 files changed
+37
-2
No files matched your search
+1
-1
@@ -15,7 +15,7 @@ const groups: { title: string; items: Item[] }[] = [
|
||||
title: 'AI 智能',
|
||||
items: [
|
||||
{ name: 'AI 图片实验室', icon: 'AI', desc: '智能抠图去背景(本地模型)、AI 无损放大变清晰(2x/4x + 5 档降噪)、一键证件照(一寸/二寸/护照,白红蓝底),图片不上传服务器', tag: '全新' },
|
||||
{ name: 'AI 问答', icon: '问', desc: '多会话对话(新建/搜索/删除、自动命名)、支持多轮上下文、模型可选、对话登录后云端同步换电脑恢复', tag: '全新' },
|
||||
{ name: 'AI 问答', icon: '问', desc: '只回答本站功能相关问题(带全站工具清单、越界自动拒绝引导)、多会话对话、多轮上下文、模型可选、对话登录后云端同步换电脑恢复', tag: '全新' },
|
||||
{ name: '文案工具箱', icon: '文', desc: '一键改写、降 AIGC 率、爆款标题、小红书文案、朋友圈文案 5 大场景,模型可选 mimo / glm', tag: '全新' },
|
||||
{ name: '截图理解(AI 看图)', icon: '看', desc: '截图/票据/合同/报错图丢进去 AI 读懂并提取关键信息(多模态),金额日期编号原样保留,5 个预设问题', tag: '全新' },
|
||||
{ name: '视频字幕 AI', icon: '幕', desc: 'Whisper 本地转录生成 SRT、AI 一键翻译英日文、时间轴预览、SRT 下载,与视频工具箱联动', tag: '全新' },
|
||||
|
||||
@@ -1,12 +1,23 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, onUnmounted, ref } from 'vue';
|
||||
import { useHead } from '@vueuse/head';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { getMachineId, licenseHeaders } from '@/tools/license/license';
|
||||
import { useGenHistory } from '@/tools/gen-history/gen-history';
|
||||
import { useToolStore } from '@/tools/tools.store';
|
||||
|
||||
useHead({ title: 'AI 问答 - IT-TOOLS-PRO' });
|
||||
const genHist = useGenHistory('ai-chat');
|
||||
|
||||
// 站点功能清单:随请求发给后端,AI 只围绕本站功能作答(实时、随工具增减自动更新)
|
||||
const toolStore = useToolStore();
|
||||
const { toolsByCategory } = storeToRefs(toolStore);
|
||||
const toolCatalog = computed(() =>
|
||||
toolsByCategory.value
|
||||
.map(c => `${c.name}:${c.components.map(t => t.name).join('、')}`)
|
||||
.join('\n'),
|
||||
);
|
||||
|
||||
interface ChatMsg {
|
||||
role: 'user' | 'assistant';
|
||||
content: string;
|
||||
@@ -147,6 +158,7 @@ async function send(text?: string) {
|
||||
prompt: content,
|
||||
model: model.value,
|
||||
history: conv.messages.slice(0, -1).slice(-8),
|
||||
tools: toolCatalog.value,
|
||||
}),
|
||||
});
|
||||
const j = await res.json().catch(() => ({}));
|
||||
|
||||
Reference in new issue
Block a user