feat(agent): 新增智能体应用功能
- 添加智能体列表页面和相关API - 实现聊天功能,包括历史对话和当前对话 - 新增工作流功能,包括表单提交和结果展示- 优化路由配置,增加智能体相关路由 - 添加全局常量和枚举,用于智能体类型区分
This commit is contained in:
52
src/views/Agent/work-flow/components/HistoryChat.vue
Normal file
52
src/views/Agent/work-flow/components/HistoryChat.vue
Normal file
@ -0,0 +1,52 @@
|
||||
<template>
|
||||
<a-layout-sider width="250" style="background: #fff">
|
||||
<div class="logo">
|
||||
<img :src="cozeInfo?.icon_url" style="width: 100%; height: 70%; border-radius: 6px" />
|
||||
</div>
|
||||
<a-menu mode="inline" theme="light">
|
||||
<a-menu-item key="1">
|
||||
<span>{{ cozeInfo.title }}</span>
|
||||
<span style="color: #8492ff; font-size: 12px">{{ cozeInfo.type == 1 ? '智能体' : '对话式' }}</span>
|
||||
<span style="float: right">{{ cozeInfo.views }}次使用</span>
|
||||
</a-menu-item>
|
||||
<a-menu-item key="2">历史对话</a-menu-item>
|
||||
<a-menu-item key="3">梳理这次舆情的时间线和关键节点</a-menu-item>
|
||||
<a-menu-item key="4">提取事件发展的五阶段脉络</a-menu-item>
|
||||
<a-menu-item key="5">提炼不同群体的主要观点和态度立场</a-menu-item>
|
||||
<a-menu-item key="6">分类汇总正面、中立、负面声音要点</a-menu-item>
|
||||
<a-menu-item key="7">分析文本中的情绪类型及占比</a-menu-item>
|
||||
<a-menu-item key="8">识别负面情绪集中的评论内容</a-menu-item>
|
||||
</a-menu>
|
||||
</a-layout-sider>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defineProps } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
cozeInfo: {
|
||||
type: Object as () => any,
|
||||
default: () => ({}),
|
||||
},
|
||||
botId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
});
|
||||
console.log(props.cozeInfo, 'cozeInfo');
|
||||
const getHistoryChat = async () => {
|
||||
const { code, data } = await getHistoryChat({ botId: props.botId });
|
||||
console.log(data, 'data');
|
||||
// 获取历史对话
|
||||
};
|
||||
|
||||
onMounted(() => {
|
||||
getHistoryChat();
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.logo {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user