amber ui guest 页面更新

rebuild page

Signed-off-by: jwai <jwai4789@gmail.com>
This commit is contained in:
jwai 2024-10-13 07:24:53 +00:00
parent dbbba63746
commit ef54223e86

View File

@ -1,173 +1,126 @@
<template>
<div class="p-4 pt-0">
<div>
<n-grid x-gap="14" cols="1 s:2" responsive="screen">
<n-gi class="mt-3 from-green-200 to-green-300 rounded-lg p-4">
<h3 class="text-2xl">Leaflow Amber</h3>
<p class="mt-3">
Amber 是一个全新的智能体平台是我们 LeaFlow
生态里面重要的一环也是我们自脱离莱云之后全新的尝试 Leaflow Amber
目前仍然处于测试阶段 不代表最终品质
</p>
<div
v-if="
siteUsage.month_tokens &&
siteUsage.month_tool_calls &&
siteUsage.month_tokens > 0 &&
siteUsage.month_tool_calls
"
>
<p class="mt-5">本月处理的 Token 和工具调用的情况</p>
<n-statistic tabular-nums>
<n-number-animation
ref="numberAnimationInstRef"
:from="
siteUsage.month_tokens < 1000
? 0
: siteUsage.month_tokens - 800
"
:to="siteUsage.month_tokens"
/>
<template #suffix> Tokens </template>
</n-statistic>
<n-statistic tabular-nums>
<n-number-animation
ref="numberAnimationInstRef"
:from="
siteUsage.month_tool_calls < 1000
? 0
: siteUsage.month_tool_calls - 800
"
:to="siteUsage.month_tool_calls"
/>
<template #suffix> Calls </template>
</n-statistic>
<n-config-provider :theme="theme">
<n-layout>
<div class="container">
<!-- Spotlight 区域 -->
<n-card class="spotlight" :bordered="false">
<div class="background-pattern"></div>
<div class="background-text">Leaflow <span class="background-amber">Amber</span></div>
<div class="spotlight-content">
<h1 class="title">
Leaflow <span class="amber-text">Amber</span>
</h1>
<p class="subtitle">
下一代智能体平台为您的数字生活带来革命性变化
<br class="mobile-break">
<a href="#" class="cta-link">立即体验 🚀</a>
</p>
<div class="stats" v-if="siteUsage.month_tokens && siteUsage.month_tool_calls">
<div class="stat-item">
<n-statistic tabular-nums>
<n-number-animation
ref="tokenAnimationRef"
:from="siteUsage.month_tokens < 1000 ? 0 : siteUsage.month_tokens - 800"
:to="siteUsage.month_tokens"
/>
<template #suffix> Tokens </template>
</n-statistic>
<div class="stat-label">本月处理 Tokens</div>
</div>
<div class="stat-item">
<n-statistic tabular-nums>
<n-number-animation
ref="callsAnimationRef"
:from="siteUsage.month_tool_calls < 1000 ? 0 : siteUsage.month_tool_calls - 800"
:to="siteUsage.month_tool_calls"
/>
<template #suffix> Calls </template>
</n-statistic>
<div class="stat-label">本月工具调用</div>
</div>
</div>
<div class="button-group">
<n-button class="transparent-button spotlight-button" ghost tag="a" href="https://github.com/ivampiresp/wp-amber" target="_blank">
WordPress 插件
</n-button>
<n-button class="transparent-button spotlight-button" ghost tag="a" href="http://qm.qq.com/cgi-bin/qm/qr?_wv=1027&k=e6RgLkc7pXr57968mYSg5X7H3puFi79b&authKey=xbG43mkYovgs%2BNW3BOG7oo%2BJZK0dbXjzyIfwW9a8himqRC6AlXOkCmb3G%2FcwOt6Y&noverify=0&group_code=439747955" target="_blank">
加入官方 QQ
</n-button>
<n-button class="transparent-button spotlight-button" ghost tag="a" href="https://amber-api.leaflow.cn/swagger/index.html" target="_blank">
Amber API 文档
</n-button>
</div>
</div>
</n-gi>
<n-gi class="mt-3 from-cyan-500 to-blue-500 rounded-lg p-4">
<h3 class="text-2xl">👋 一起加入</h3>
<p class="mt-3">
我们提供了 WP Amber WordPress 插件可以将 Amber
放到你的博客中让您的访客通过助理来总结并解释文章等
</p>
<n-image :src="grouppng" width="150" height="300" />
</n-gi>
</n-card>
<n-gi class="mt-3 from-cyan-500 to-blue-500 rounded-lg p-4">
<h3 class="text-2xl">💬 对话优化引擎</h3>
<!-- 功能特点展示 -->
<div class="features-section">
<h2 class="section-title">Amber 核心特性</h2>
<n-grid :cols="3" :x-gap="24" :y-gap="24" responsive="screen">
<n-gi span="3 m:1" v-for="(feature, index) in features" :key="index">
<div class="feature-card" @click="toggleFeatureDescription(feature)">
<div class="feature-content">
<div class="feature-icon">{{ feature.icon }}</div>
<div class="feature-title">{{ feature.title }}</div>
<transition name="fade-height" mode="out-in">
<p class="feature-description" :key="feature.showLong">
{{ feature.showLong ? feature.longDescription : feature.shortDescription }}
</p>
</transition>
</div>
</div>
</n-gi>
</n-grid>
</div>
<p class="mt-3">
Amber
的对话优化引擎无与伦比我们独特的对话功能支持多个助理并行工作您可以通过输入
@
或点击右上角的切换助理选项轻松指定下一个回复的助理所有助理共享一个上下文彼此了解每个操作为您提供流畅一致的对话体验与一些只能处理单一对话的竞品相比Amber
的多助理协作系统显得更为智能和高效在重大决策型的使用场景中你可以通过
Amber 对话引擎去得到 N Second Opinion Amber
为聊天场景做了很多的优化它将更能处理您日常生活中的问题
</p>
</n-gi>
<n-gi class="mt-3 from-cyan-500 to-blue-500 rounded-lg p-4">
<h3 class="text-2xl">📖 智能上下文</h3>
<p class="mt-3">
Amber
拥有独特的智能上下文技术能够根据对话场景自动调整上下文这一过程对用户是透明的您无需手动干预系统会智能识别何时需要移除或添加上下文信息这种灵活性不仅提升了对话的流畅性还能显著降低
Token 的消耗节省从几千到几万不等的费用帮助用户更高效地利用资源
</p>
<p>
需要注意的是OpenAI
兼容模式不支持智能上下文功能因此在使用该模式时您将无法享受到这一创新技术带来的便利我们建议您在适用的情况下充分利用
Amber 的智能上下文以优化您的对话体验和资源使用
</p>
</n-gi>
<n-gi class="mt-3 from-cyan-500 to-blue-500 rounded-lg p-4">
<h3 class="text-2xl">🛠 客制化</h3>
<p class="mt-3">
Amber 具备了目前主流 LLM
对话平台都拥有的高自由度智能体自定义功能用户可以自定义提示词绑定工具以完成复杂任务并优化工作流例如您可以设置助理在每天早上自动为您生成当天的工作清单或者在您需要时快速调用数据分析工具我们的助理不仅能执行简单的任务还能实现多步骤的复杂操作并与知识库无缝集成说它是您高效工作的得力助手绝不为过
💪
</p>
</n-gi>
<n-gi class="mt-3 from-cyan-500 to-blue-500 rounded-lg p-4">
<h3 class="text-2xl">🧠 记忆</h3>
<p class="mt-3">
Amber
通过采样您的对话内容生成记忆这些记忆是碎片化的但对话中共享您可以随时清除所有记忆确保数据的灵活管理Amber
会收集您的消息并且根据消息推断您的喜好记忆的内容您完全可以控制甚至禁用助理的记忆助理将会根据您的记忆来改变响应的结果您喜欢什么您直接在对话中说明即可Amber
会从第二条消息开始学习记忆
</p>
</n-gi>
<n-gi class="mt-3 from-cyan-500 to-blue-500 rounded-lg p-4">
<h3 class="text-2xl">🔗 API</h3>
<p class="mt-3">
我们提供强大的助理 API支持兼容 OpenAI 格式的应用接入 Amber通过
Chat Completion API您可以直接调用 Amber
的工具记忆以及知识库功能例如一个开发者可以轻松地将 Amber
集成到他们的客服系统中自动处理常见问题并提供高效的解决方案相较于其他平台我们的
API 更具灵活性和扩展性让您的应用赋予更多可能不仅仅在 Amber
系统的本身您也可以通过我们 Leaflow 平台的 UserLand解锁更多高阶
API 玩法 🚀
</p>
<p class="mt-3">
如果您要使用 Amber API请查看此链接<n-a
target="_blank"
href="https://amber-api.leaflow.cn/swagger/index.html"
>Amber API</n-a
>
</p>
</n-gi>
<n-gi class="mt-3 from-cyan-500 to-blue-500 rounded-lg p-4">
<h3 class="text-2xl">🛠 工具集成</h3>
<p class="mt-3">
我们的工具功能拥有极大的扩展性且工具系统拥有更多的对话控制功能所以目前不兼容
OpenAI
新版本的格式工具可以助您高效完成各类任务例如您可以将自己的应用或者
Home Assistant 接入 Amber随后在对话中控制它Amber
的记忆功能将会记住你的喜好接入教程和详细文档将在近期提供 📈
</p>
</n-gi>
<n-gi class="mt-3 from-cyan-500 to-blue-500 rounded-lg p-4">
<h3 class="text-2xl">📚 文档管理</h3>
<p class="mt-3">
文档管理是 Amber
知识库的核心功能之一对话中上传的文件将自动保存至知识库您只需设置助理关联知识库即可实现快速检索和使用假设您是一位项目经理您可以在对话中上传项目计划书并在需要时快速检索相关内容Amber
在您发送消息时将会自动搜索资料库此外我们正在开发桌面端软件该软件可以根据您的需要同步文档至
Amber以便随时调用🗂 Amber
不会长期保存您的文档的源文件我们不建议您上传具有机密性的文档
</p>
</n-gi>
<n-gi class="mt-3 from-cyan-500 to-blue-500 rounded-lg p-4">
<h3 class="text-2xl">🔗 合作伙伴</h3>
<p class="mt-3">
<n-a target="_blank" href="https://www.himcbbs.com/">HiMCBBS 我的世界中文论坛</n-a>
</p>
</n-gi>
</n-grid>
</div>
</div>
<!-- 合作伙伴板块 -->
<div class="partners-section">
<h2 class="section-title">合作伙伴</h2>
<div class="partner-grid">
<div v-for="partner in partners" :key="partner.name" class="partner-card">
<div class="partner-logo-container">
<img :src="partner.logo" :alt="partner.name" class="partner-logo">
</div>
<h3 class="partner-name">{{ partner.name }}</h3>
<p class="partner-description">{{ partner.description }}</p>
<a :href="partner.link" target="_blank" class="partner-link">了解更多</a>
</div>
</div>
</div>
</div>
</n-layout>
</n-config-provider>
</template>
<script setup lang="ts">
// import router from "../router";
// import { useUserStore } from "../stores/user";
import grouppng from "@/assets/images/group.png";
import { ref, computed, onMounted } from 'vue';
import { useOsTheme, darkTheme, NConfigProvider, NLayout, NButton, NCard, NStatistic, NNumberAnimation } from 'naive-ui';
import { SchemaSiteUsageResponse } from "@/api";
import getApi from "@/plugins/api";
import grouppng from "@/assets/images/group.png";
// const userStore = useUserStore();
const siteUsage: Ref<SchemaSiteUsageResponse> = ref({});
const osTheme = useOsTheme();
const theme = computed(() => (osTheme.value === 'dark' ? darkTheme : null));
// const login = () => {
// router.push("/auth/login");
// };
const siteUsage = ref<SchemaSiteUsageResponse>({});
const features = ref([
// ... features ...
]);
const partners = ref([
{
name: 'HiMCBBS 我的世界中文论坛',
logo: 'https://www.himcbbs.com/data/assets/logo/wxmc_logo_text_blue.svg',
link: 'https://www.himcbbs.com/',
description: '中国最大的我的世界玩家社区,提供游戏资讯、模组下载和创意分享。'
}
//
]);
const toggleFeatureDescription = (feature) => {
feature.showLong = !feature.showLong;
};
onMounted(async () => {
const r = (await getApi().Usage.apiV1UsageGet()).data.data;
@ -176,3 +129,321 @@ onMounted(async () => {
}
});
</script>
<style scoped>
:root {
--primary-color: #4ebbc0;
--text-color: v-bind('theme ? "#ffffff" : "#333333"');
--background-color: v-bind('theme ? "#1a1a1a" : "#f5f5f5"');
--card-background: v-bind('theme ? "rgba(255, 255, 255, 0.1)" : "rgba(255, 255, 255, 0.8)"');
}
body {
font-family: 'Arial', sans-serif;
color: var(--text-color);
background-color: var(--background-color);
transition: background-color 0.3s ease;
}
.container {
width: 100%;
max-width: 1200px;
margin: 0 auto;
padding: 2rem;
}
.spotlight {
background-color: v-bind('theme ? "rgba(0, 0, 0, 0.5)" : "rgba(78, 187, 192, 0.1)"');
backdrop-filter: blur(10px);
height: 70vh;
min-height: 500px;
display: flex;
align-items: center;
justify-content: center;
margin: 2rem 0;
position: relative;
overflow: hidden;
border-radius: 10px;
box-shadow: v-bind('theme ? "0 4px 6px rgba(0, 0, 0, 0.1)" : "0 4px 6px rgba(78, 187, 192, 0.2)"');
}
.background-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%) rotate(-30deg);
font-size: 20vw;
font-weight: bold;
color: transparent;
-webkit-text-stroke: 1px v-bind('theme ? "rgba(255, 255, 255, 0.1)" : "rgba(0, 0, 0, 0.05)"');
white-space: nowrap;
z-index: 1;
}
.background-amber {
-webkit-text-stroke: 1px v-bind('theme ? "rgba(78, 187, 192, 0.2)" : "rgba(78, 187, 192, 0.3)"');
}
.spotlight-content {
text-align: center;
color: v-bind('theme ? "white" : "rgba(0, 0, 0, 0.8)"');
padding: 2rem;
width: 100%;
max-width: 1000px;
position: relative;
z-index: 2;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}
.title {
font-size: clamp(2.5rem, 8vw, 5rem);
font-weight: bold;
margin-bottom: 1rem;
color: v-bind('theme ? "white" : "rgba(0, 0, 0, 0.8)"');
width: 100%;
text-align: center;
}
.amber-text {
color: #4ebbc0;
}
.subtitle {
font-size: clamp(1rem, 2vw, 1.25rem);
opacity: 0.9;
margin-bottom: 2rem;
max-width: 600px;
}
.cta-link {
color: #4ebbc0;
font-weight: bold;
text-decoration: underline;
}
.stats {
display: flex;
justify-content: center;
gap: 2rem;
margin-bottom: 2rem;
}
.stat-item {
text-align: center;
}
.stat-value {
font-size: clamp(1.5rem, 4vw, 2.5rem);
font-weight: bold;
color: #4ebbc0;
}
.stat-label {
font-size: 1rem;
opacity: 0.8;
}
.transparent-button {
background-color: v-bind('theme ? "rgba(255, 255, 255, 0.2)" : "rgba(78, 187, 192, 0.1)"');
border: 1px solid v-bind('theme ? "rgba(255, 255, 255, 0.5)" : "rgba(78, 187, 192, 0.3)"');
color: v-bind('theme ? "white" : "rgba(0, 0, 0, 0.7)"');
padding: 0.5rem 1rem;
font-size: 1rem;
border-radius: 5px;
cursor: pointer;
transition: all 0.3s ease;
text-decoration: none;
display: inline-block;
margin: 0.5rem;
}
.spotlight-button {
position: relative;
overflow: hidden;
}
.spotlight-button::before {
content: '';
position: absolute;
top: 50%;
left: 50%;
width: 0;
height: 0;
background-color: rgba(78, 187, 192, 0.3);
border-radius: 50%;
transform: translate(-50%, -50%);
transition: width 0.6s ease, height 0.6s ease;
}
.spotlight-button:hover::before {
width: 300px;
height: 300px;
}
.spotlight-button:hover {
background-color: v-bind('theme ? "rgba(255, 255, 255, 0.3)" : "transparent"');
border-color: #4ebbc0;
color: v-bind('theme ? "white" : "#4ebbc0"');
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(78, 187, 192, 0.2);
}
:root[data-theme="dark"] .spotlight-button:hover {
background-color: rgba(255, 255, 255, 0.3);
color: white;
}
.features-section {
margin-top: 4rem;
}
.section-title {
font-size: 2.5rem;
font-weight: bold;
text-align: center;
margin-bottom: 3rem;
color: v-bind('theme ? "white" : "rgba(0, 0, 0, 0.8)"');
}
.feature-card {
background-color: var(--card-background);
border-radius: 10px;
padding: 2rem;
height: 100%;
transition: all 0.3s ease;
cursor: pointer;
}
.feature-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(78, 187, 192, 0.2);
}
.feature-icon {
font-size: 3rem;
margin-bottom: 1rem;
}
.feature-title {
font-size: 1.5rem;
font-weight: bold;
margin-bottom: 1rem;
color: #4ebbc0;
}
.feature-description {
font-size: 1rem;
line-height: 1.6;
}
.fade-height-enter-active,
.fade-height-leave-active {
transition: all 0.3s;
max-height: 1000px;
opacity: 1;
}
.fade-height-enter-from,
.fade-height-leave-to {
max-height: 0;
opacity: 0;
}
.partners-section {
margin-top: 4rem;
text-align: center;
}
.partner-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 2rem;
margin-top: 2rem;
}
.partner-card {
background-color: var(--card-background);
border-radius: 15px;
padding: 2rem;
transition: all 0.3s ease;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.partner-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 20px rgba(78, 187, 192, 0.2);
}
.partner-logo-container {
width: 120px;
height: 120px;
display: flex;
align-items: center;
justify-content: center;
margin-bottom: 1rem;
background-color: white;
border-radius: 50%;
padding: 1rem;
}
.partner-logo {
max-width: 100%;
max-height: 100%;
object-fit: contain;
}
.partner-name {
font-size: 1.2rem;
font-weight: bold;
margin-bottom: 0.5rem;
color: var(--primary-color);
}
.partner-description {
font-size: 0.9rem;
color: var(--text-color);
margin-bottom: 1rem;
}
.partner-link {
color: var(--primary-color);
text-decoration: none;
font-weight: bold;
transition: all 0.3s ease;
}
.partner-link:hover {
text-decoration: underline;
}
@media (max-width: 768px) {
.spotlight {
height: auto;
padding: 4rem 1rem;
}
.background-text {
font-size: 15vw;
}
.stats {
flex-direction: column;
gap: 1rem;
}
.transparent-button {
margin: 0.5rem 0;
}
.partner-grid {
grid-template-columns: 1fr;
}
}
</style>