add introduction tips
This commit is contained in:
1 parent
18ec9d181c
commit
a0adfb4db4
12 files changed
+76
-38
No files matched your search
@@ -6,7 +6,7 @@
|
||||
import { defineComponent } from 'vue';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'AnwseringMark',
|
||||
name: 'AnsweringMark',
|
||||
data() {
|
||||
return {};
|
||||
},
|
||||
|
||||
@@ -102,7 +102,9 @@ export default defineComponent({
|
||||
this.$emit('update:question', val);
|
||||
},
|
||||
question(val: string) {
|
||||
this.questionValue = val;
|
||||
if (val !== this.questionValue) {
|
||||
this.questionValue = val;
|
||||
}
|
||||
},
|
||||
references(val: string[]) {
|
||||
if (val.length === 0) {
|
||||
|
||||
@@ -1,45 +1,68 @@
|
||||
<template>
|
||||
<div class="introduction">
|
||||
<h2 class="title">ChatGPT</h2>
|
||||
<el-row class="introduction-items" justify="center" :gutter="15">
|
||||
<el-col :md="8" :sm="24" :xs="24">
|
||||
<div class="text-center">
|
||||
<font-awesome-icon icon="fa-regular fa-sun" class="icon icon-rotate" />
|
||||
</div>
|
||||
<h3 class="subtitle">{{ $t('conversation.title.example') }}</h3>
|
||||
<h3 class="subtitle">{{ $t('chat.title.complexQuestion') }}</h3>
|
||||
<introduction-item
|
||||
:content="$t('conversation.message.writeCode')"
|
||||
:content="$t('chat.message.question1')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('conversation.message.writeCode'))"
|
||||
@click="$emit('draft', $t('chat.message.question1'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('conversation.message.writeEmail')"
|
||||
:content="$t('chat.message.question2')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('conversation.message.writeEmail'))"
|
||||
@click="$emit('draft', $t('chat.message.question2'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('conversation.message.explainDefinition')"
|
||||
:content="$t('chat.message.question3')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('conversation.message.explainDefinition'))"
|
||||
@click="$emit('draft', $t('chat.message.question3'))"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="24" :xs="24">
|
||||
<div class="text-center">
|
||||
<font-awesome-icon icon="fa-solid fa-bolt" class="icon icon-rotate" />
|
||||
<font-awesome-icon icon="fa-solid fa-book" class="icon icon-rotate" />
|
||||
</div>
|
||||
<h3 class="subtitle">{{ $t('conversation.title.capabilities') }}</h3>
|
||||
<introduction-item :content="$t('conversation.message.rememberHistory')" />
|
||||
<introduction-item :content="$t('conversation.message.supportStream')" />
|
||||
<introduction-item :content="$t('conversation.message.rejectInvalidPrompt')" />
|
||||
<h3 class="subtitle">{{ $t('chat.title.professionalQuestion') }}</h3>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question4')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question4'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question5')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question5'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question6')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question6'))"
|
||||
/>
|
||||
</el-col>
|
||||
<el-col :md="8" :sm="24" :xs="24">
|
||||
<div class="text-center">
|
||||
<font-awesome-icon icon="fa-solid fa-triangle-exclamation" class="icon icon-rotate" />
|
||||
<font-awesome-icon icon="fa-solid fa-fire" class="icon icon-rotate" />
|
||||
</div>
|
||||
<h3 class="subtitle">{{ $t('conversation.title.limitations') }}</h3>
|
||||
<introduction-item :content="$t('conversation.message.generateInCorrect')" />
|
||||
<introduction-item :content="$t('conversation.message.generateHarmfulInfo')" />
|
||||
<introduction-item :content="$t('conversation.message.onlyKnowBefore2021')" />
|
||||
<h3 class="subtitle">{{ $t('chat.title.getTips') }}</h3>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question7')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question7'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question8')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question8'))"
|
||||
/>
|
||||
<introduction-item
|
||||
:content="$t('chat.message.question9')"
|
||||
class="cursor-pointer"
|
||||
@click="$emit('draft', $t('chat.message.question9'))"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
@@ -28,5 +28,6 @@ export default defineComponent({
|
||||
background-color: #eee;
|
||||
color: #333;
|
||||
padding: 10px 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
</style>
|
||||
@@ -72,7 +72,6 @@ import { ROUTE_CHAT_CONVERSATION, ROUTE_CHAT_CONVERSATION_NEW } from '@/router/c
|
||||
import { chatOperator } from '@/operators';
|
||||
import { IChatConversation } from '@/operators/chat/models';
|
||||
import { Status } from '@/store/common/models';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
|
||||
export default defineComponent({
|
||||
name: 'SidePanel',
|
||||
|
||||
@@ -8,10 +8,15 @@ export default {
|
||||
uploadReferencesError: '上传文件失败,请稍后重试',
|
||||
notApplied: '您尚未申请该服务,请先申请',
|
||||
tryForFree: '免费使用',
|
||||
initializing: '初始化中,请稍后...',
|
||||
writeCode: '写一段 JavaScript 代码,输出 Hello World',
|
||||
writeEmail: '写一封邮件给 Bob,告诉他我刚刚搬家了',
|
||||
explainDefinition: '用简单的术语解释量子计算',
|
||||
question1: '写一段 JavaScript 代码,输出 Hello World',
|
||||
question2: '写一封邮件给晓伟,告诉他我刚刚搬家了',
|
||||
question3: '用简单的术语解释量子计算的基本原理',
|
||||
question4: '数字媒体和虚拟现实对艺术创作和表现形式产生了怎样的影响?',
|
||||
question5: '在数字时代,隐私保护和数据安全如何影响法律实践?',
|
||||
question6: '作为一名会计师,如何应对复杂的税务法规变化?',
|
||||
question7: '如何结合不同地区的文化背景创作独特美食?',
|
||||
question8: '如何通过旅行体验汲取文学创作灵感,塑造丰富故事?',
|
||||
question9: '如何从不同行业的成功案例中获取商业创意,创新经营策略?',
|
||||
rememberHistory: '可以记住用户说过的话',
|
||||
supportStream: '支持流式数据传输',
|
||||
rejectInvalidPrompt: '可以拒绝回答不恰当的提问',
|
||||
|
||||
@@ -2,5 +2,8 @@ export default {
|
||||
chat: 'AI问答',
|
||||
example: '样例',
|
||||
capabilities: '功能',
|
||||
limitations: '限制'
|
||||
limitations: '限制',
|
||||
complexQuestion: '解答复杂问题',
|
||||
professionalQuestion: '咨询专业问题',
|
||||
getTips: '获取灵感创意'
|
||||
};
|
||||
@@ -8,7 +8,8 @@
|
||||
@refresh="$store.dispatch('chat/getApplications')"
|
||||
/>
|
||||
<div class="dialogue">
|
||||
<div class="messages">
|
||||
<introduction v-if="messages.length === 0" @draft="onDraft" />
|
||||
<div v-else class="messages">
|
||||
<message v-for="(message, messageIndex) in messages" :key="messageIndex" :message="message" class="message" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,6 +47,7 @@ import ApiStatus from '@/components/common/ApiStatus.vue';
|
||||
import { ROUTE_CHAT_CONVERSATION, ROUTE_CHAT_CONVERSATION_NEW } from '@/router';
|
||||
import { Status } from '@/store/common/models';
|
||||
import { log } from '@/utils/log';
|
||||
import Introduction from '@/components/chat/Introduction.vue';
|
||||
|
||||
export interface IData {
|
||||
question: string;
|
||||
@@ -57,6 +59,7 @@ export default defineComponent({
|
||||
name: 'ChatConversation',
|
||||
components: {
|
||||
InputBox,
|
||||
Introduction,
|
||||
ModelSelector,
|
||||
Message,
|
||||
ApiStatus
|
||||
@@ -116,6 +119,11 @@ export default defineComponent({
|
||||
this.onScrollDown();
|
||||
},
|
||||
methods: {
|
||||
async onDraft(question: string) {
|
||||
console.log('onDraft', question);
|
||||
this.question = question;
|
||||
this.onSubmit();
|
||||
},
|
||||
async onCreateNewConversation() {
|
||||
await this.$router.push({
|
||||
name: ROUTE_CHAT_CONVERSATION_NEW
|
||||
@@ -265,6 +273,7 @@ export default defineComponent({
|
||||
flex: 1;
|
||||
overflow-y: scroll;
|
||||
margin: 20px 0;
|
||||
position: relative;
|
||||
.messages {
|
||||
padding-top: 30px;
|
||||
.message {
|
||||
|
||||
@@ -11,8 +11,7 @@
|
||||
<script lang="ts">
|
||||
import { defineComponent } from 'vue';
|
||||
import { ElButton } from 'element-plus';
|
||||
import { v4 as uuid } from 'uuid';
|
||||
import { ROUTE_CHAT_CONVERSATION } from '@/router/constants';
|
||||
import { ROUTE_CHAT_CONVERSATION_NEW } from '@/router/constants';
|
||||
|
||||
interface IData {
|
||||
model: string;
|
||||
@@ -33,10 +32,7 @@ export default defineComponent({
|
||||
methods: {
|
||||
onStart() {
|
||||
this.$router.push({
|
||||
name: ROUTE_CHAT_CONVERSATION,
|
||||
params: {
|
||||
id: uuid()
|
||||
}
|
||||
name: ROUTE_CHAT_CONVERSATION_NEW
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,8 +120,7 @@ export default defineComponent({
|
||||
ElTable,
|
||||
ElTableColumn,
|
||||
ElButton,
|
||||
ElTag,
|
||||
ElCard
|
||||
ElTag
|
||||
},
|
||||
data(): IData {
|
||||
return {
|
||||
|
||||
@@ -40,12 +40,9 @@ import ChannelSelector from '@/components/midjourney/ChannelSelector.vue';
|
||||
import ReferenceImage from '@/components/midjourney/ReferenceImage.vue';
|
||||
import {
|
||||
IApplication,
|
||||
IMidjourneyChannel,
|
||||
MidjourneyImagineAction,
|
||||
MIDJOURNEY_CHANNEL_FAST,
|
||||
applicationOperator,
|
||||
midjourneyOperator,
|
||||
IMidjourneyImagineTask,
|
||||
IMidjourneyImagineRequest,
|
||||
IApplicationDetailResponse
|
||||
} from '@/operators';
|
||||
|
||||
@@ -8,6 +8,8 @@ import {
|
||||
faClock as faRegularClock
|
||||
} from '@fortawesome/free-regular-svg-icons';
|
||||
import {
|
||||
faFire as faSolidFire,
|
||||
faBook as faSolidBook,
|
||||
faCompass as faSolidCompass,
|
||||
faLocationArrow as faSolidLocationArrow,
|
||||
faPaperclip as faSolidPaperclip,
|
||||
@@ -48,6 +50,7 @@ library.add(faSolidCube);
|
||||
library.add(faSolidCompass);
|
||||
library.add(faSolidPaperclip);
|
||||
library.add(faSolidXmark);
|
||||
library.add(faSolidFire);
|
||||
library.add(faSolidRotateRight);
|
||||
library.add(faSolidPenToSquare);
|
||||
library.add(faSolidCheck);
|
||||
@@ -55,6 +58,7 @@ library.add(faSolidLocationArrow);
|
||||
library.add(faRegularUser);
|
||||
library.add(faRegularSun);
|
||||
library.add(faSolidBolt);
|
||||
library.add(faSolidBook);
|
||||
library.add(faSolidGear);
|
||||
library.add(faSolidMicrophone);
|
||||
library.add(faSolidBars);
|
||||
|
||||
Reference in new issue
Block a user