From cbd8c0d6e814368eb19772ba969055392aa7c136 Mon Sep 17 00:00:00 2001 From: dingyi Date: Mon, 5 Feb 2024 23:29:11 +0800 Subject: [PATCH] chore: delete poe doc --- docs/.vitepress/config.ts | 349 ++++++++++----------- docs/.vitepress/theme/custom.css | 126 +++++++- docs/guide/configure-model-platform/poe.md | 0 3 files changed, 298 insertions(+), 177 deletions(-) delete mode 100644 docs/guide/configure-model-platform/poe.md diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index f79bf2c9..32405e2a 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -1,65 +1,65 @@ -import { defineConfig } from 'vitepress'; -import { DefaultTheme } from 'vitepress/types/default-theme'; -import { tabsMarkdownPlugin } from 'vitepress-plugin-tabs'; +import { defineConfig } from "vitepress"; +import { DefaultTheme } from "vitepress/types/default-theme"; +import { tabsMarkdownPlugin } from "vitepress-plugin-tabs"; export default defineConfig({ - lang: 'zh-CN', - title: 'ChatLuna', - titleTemplate: ':title - ChatLuna Doc', + lang: "zh-CN", + title: "ChatLuna", + titleTemplate: ":title - ChatLuna Doc", // base: "", - description: 'ChatLuna 相关文档', + description: "ChatLuna 相关文档", ignoreDeadLinks: true, lastUpdated: true, cleanUrls: false, head: [ - ['meta', { name: 'theme-color', content: '#47A69E' }], - ['link', { rel: 'icon', href: 'logo.jpg' }], + ["meta", { name: "theme-color", content: "#47A69E" }], + ["link", { rel: "icon", href: "logo.jpg" }], ], themeConfig: { outline: { - label: '本页目录', - level: 'deep', + label: "本页目录", + level: "deep", }, nav: nav(), sidebar: { - '/guide/': sidebarGuide(), - '/development/': sidebarDevelopment(), + "/guide/": sidebarGuide(), + "/development/": sidebarDevelopment(), }, editLink: { - pattern: 'https://github.com/ChatLunaLab/doc/edit/main/docs/:path', - text: '在 GitHub 上编辑此页', + pattern: "https://github.com/ChatLunaLab/doc/edit/main/docs/:path", + text: "在 GitHub 上编辑此页", }, socialLinks: [ - { icon: 'github', link: 'https://github.com/ChatLunaLab/chatluna' }, + { icon: "github", link: "https://github.com/ChatLunaLab/chatluna" }, ], footer: { - message: '文档在 CC-BY-SA-4.0 许可下发布', - copyright: 'Copyright © 2023 ChatLuna Lab', + message: "文档在 CC-BY-SA-4.0 许可下发布", + copyright: "Copyright © 2023 ChatLuna Lab", }, - lastUpdatedText: '上次更新时间', - returnToTopLabel: '返回顶部', - sidebarMenuLabel: '目录', - docFooter: { prev: '上一篇', next: '下一篇' }, + lastUpdatedText: "上次更新时间", + returnToTopLabel: "返回顶部", + sidebarMenuLabel: "目录", + docFooter: { prev: "上一篇", next: "下一篇" }, search: { - provider: 'local', + provider: "local", options: { locales: { root: { translations: { button: { - buttonText: '搜索文档', - buttonAriaLabel: '搜索文档', + buttonText: "搜索文档", + buttonAriaLabel: "搜索文档", }, modal: { - noResultsText: '无法找到相关结果', - resetButtonTitle: '清除查询条件', + noResultsText: "无法找到相关结果", + resetButtonTitle: "清除查询条件", footer: { - selectText: '选择', - navigateText: '切换', - closeText: '关闭', + selectText: "选择", + navigateText: "切换", + closeText: "关闭", }, }, }, @@ -70,8 +70,8 @@ export default defineConfig({ }, locales: { root: { - label: 'Chinese', - lang: 'zh', + label: "Chinese", + lang: "zh", }, }, markdown: { @@ -84,207 +84,204 @@ export default defineConfig({ function sidebarGuide() { return [ { - text: '指南', + text: "指南", items: [ - { text: '插件介绍', link: '/guide/introduction' }, - { text: '快速上手', link: '/guide/getting-started' }, - { text: '用法', link: '/guide/useful-commands' }, - { text: '配置项', link: '/guide/useful-configurations' }, + { text: "插件介绍", link: "/guide/introduction" }, + { text: "快速上手", link: "/guide/getting-started" }, + { text: "用法", link: "/guide/useful-commands" }, + { text: "配置项", link: "/guide/useful-configurations" }, ], }, { - text: '进阶', + text: "进阶", items: [ { - text: '模型平台', + text: "模型平台", collapsed: true, items: [ { - text: '介绍', - link: '/guide/configure-model-platform/introduction', + text: "介绍", + link: "/guide/configure-model-platform/introduction", }, { - text: 'OpenAI', - link: '/guide/configure-model-platform/openai', + text: "OpenAI", + link: "/guide/configure-model-platform/openai", }, { - text: 'New Bing', - link: '/guide/configure-model-platform/bing-chat', + text: "New Bing", + link: "/guide/configure-model-platform/bing-chat", }, { - text: 'Google gemini', - link: '/guide/configure-model-platform/google-gemini', + text: "Google gemini", + link: "/guide/configure-model-platform/google-gemini", }, { - text: 'Claude 2', - link: '/guide/configure-model-platform/cluade-2', - }, - { - text: 'Poe', - link: '/guide/configure-model-platform/poe', + text: "Claude 2", + link: "/guide/configure-model-platform/cluade-2", }, + { - text: 'Bard', - link: '/guide/configure-model-platform/bard', + text: "Bard", + link: "/guide/configure-model-platform/bard", }, { - text: '文心一言', - link: '/guide/configure-model-platform/wenxin', + text: "文心一言", + link: "/guide/configure-model-platform/wenxin", }, { - text: '讯飞星火', - link: '/guide/configure-model-platform/spark', + text: "讯飞星火", + link: "/guide/configure-model-platform/spark", }, { - text: '通义千问', - link: '/guide/configure-model-platform/qwen', + text: "通义千问", + link: "/guide/configure-model-platform/qwen", }, { - text: 'Chat GLM', - link: '/guide/configure-model-platform/chat-glm', + text: "Chat GLM", + link: "/guide/configure-model-platform/chat-glm", }, ], }, { - text: '嵌入模型', + text: "嵌入模型", collapsed: true, items: [ { - text: '介绍', - link: '/guide/configure-embedding-model/introduction', + text: "介绍", + link: "/guide/configure-embedding-model/introduction", }, { - text: 'OpenAI Embeddings', - link: '/guide/configure-embedding-model/openai-embeddings', + text: "OpenAI Embeddings", + link: "/guide/configure-embedding-model/openai-embeddings", }, { - text: 'Hugging Face Embeddings', - link: '/guide/configure-embedding-model/hugging-face-embeddings', + text: "Hugging Face Embeddings", + link: "/guide/configure-embedding-model/hugging-face-embeddings", }, ], }, { - text: '向量数据库', + text: "向量数据库", collapsed: true, items: [ { - text: '介绍', - link: '/guide/configure-vector-database/introduction', + text: "介绍", + link: "/guide/configure-vector-database/introduction", }, { - text: 'Faiss', - link: '/guide/configure-vector-database/faiss', + text: "Faiss", + link: "/guide/configure-vector-database/faiss", }, { - text: 'Pinecone', - link: '/guide/configure-vector-database/pinecone', + text: "Pinecone", + link: "/guide/configure-vector-database/pinecone", }, ], }, { - text: '预设系统', + text: "预设系统", collapsed: true, items: [ { - text: '介绍', - link: '/guide/preset-system/introduction', + text: "介绍", + link: "/guide/preset-system/introduction", }, { - text: '使用预设', - link: '/guide/preset-system/switch-preset', + text: "使用预设", + link: "/guide/preset-system/switch-preset", }, { - text: '编写预设', - link: '/guide/preset-system/write-preset', + text: "编写预设", + link: "/guide/preset-system/write-preset", }, { - text: '分享预设', - link: '/guide/preset-system/share-preset', + text: "分享预设", + link: "/guide/preset-system/share-preset", }, ], }, { - text: '会话相关', + text: "会话相关", collapsed: true, items: [ { - text: '房间系统', - link: '/guide/session-related/room', + text: "房间系统", + link: "/guide/session-related/room", }, { - text: '黑名单', - link: '/guide/session-related/blacklist', + text: "黑名单", + link: "/guide/session-related/blacklist", }, { - text: '长期记忆', - link: '/guide/session-related/long-term-memory', + text: "长期记忆", + link: "/guide/session-related/long-term-memory", }, { - text: '配额组', - link: '/guide/session-related/concurrency-limit', + text: "配额组", + link: "/guide/session-related/concurrency-limit", }, ], }, { - text: '聊天链', + text: "聊天链", collapsed: true, items: [ { - text: '介绍', - link: '/guide/chat-chain/introduction', + text: "介绍", + link: "/guide/chat-chain/introduction", }, { - text: '聊天模式', - link: '/guide/chat-chain/chat-mode', + text: "聊天模式", + link: "/guide/chat-chain/chat-mode", }, { - text: '输出格式', - link: '/guide/chat-chain/output-mode', + text: "输出格式", + link: "/guide/chat-chain/output-mode", }, ], }, { - text: '模型插件', + text: "模型插件", collapsed: true, items: [ { - text: '介绍', - link: '/guide/model-plugin-system/introduction', + text: "介绍", + link: "/guide/model-plugin-system/introduction", }, { - text: '联网浏览搜索', - link: '/guide/model-plugin-system/web-search', + text: "联网浏览搜索", + link: "/guide/model-plugin-system/web-search", }, { - text: '网络请求', - link: '/guide/model-plugin-system/request-web', + text: "网络请求", + link: "/guide/model-plugin-system/request-web", }, { - text: '文件读写', - link: '/guide/model-plugin-system/file-io', + text: "文件读写", + link: "/guide/model-plugin-system/file-io", }, { - text: '群管', - link: '/guide/model-plugin-system/guild-manager', + text: "群管", + link: "/guide/model-plugin-system/guild-manager", }, { - text: '定时任务', - link: '/guide/model-plugin-system/cron', + text: "定时任务", + link: "/guide/model-plugin-system/cron", }, ], }, ], }, { - text: 'FAQ', + text: "FAQ", items: [ { - text: '错误码表', - link: '/guide/faq/error_code', + text: "错误码表", + link: "/guide/faq/error_code", }, { - text: '代理设置', - link: '/guide/faq/set_proxy', + text: "代理设置", + link: "/guide/faq/set_proxy", }, ], }, @@ -294,121 +291,121 @@ function sidebarGuide() { function sidebarDevelopment(): DefaultTheme.SidebarItem[] { return [ { - text: '总览', - link: '/development/introduction', + text: "总览", + link: "/development/introduction", }, { - text: '起步', + text: "起步", items: [ { - text: '为 ChatLuna 开发插件', - link: '/development/getting-started', + text: "为 ChatLuna 开发插件", + link: "/development/getting-started", }, { - text: '调用 ChatLuna API', - link: '/development/call-chathub-api', + text: "调用 ChatLuna API", + link: "/development/call-chathub-api", }, ], }, { - text: '接入服务', + text: "接入服务", items: [ { - text: '语言模型', - link: '/development/connect-to-core-services/language-model', + text: "语言模型", + link: "/development/connect-to-core-services/language-model", }, { - text: '嵌入模型', - link: '/development/connect-to-core-services/embedding-model', + text: "嵌入模型", + link: "/development/connect-to-core-services/embedding-model", }, { - text: '向量数据库', - link: '/development/connect-to-core-services/vector-database', + text: "向量数据库", + link: "/development/connect-to-core-services/vector-database", }, { - text: '模型工具', - link: '/development/connect-to-core-services/model-tool', + text: "模型工具", + link: "/development/connect-to-core-services/model-tool", }, { - text: '中间件', - link: '/development/connect-to-core-services/middleware', + text: "中间件", + link: "/development/connect-to-core-services/middleware", }, { - text: '消息读取', - link: '/development/connect-to-core-services/message-read', + text: "消息读取", + link: "/development/connect-to-core-services/message-read", }, ], }, { - text: '调用服务', + text: "调用服务", items: [ { - text: '语言模型', - link: '/development/call-core-services/language-model', + text: "语言模型", + link: "/development/call-core-services/language-model", }, { - text: '嵌入模型', - link: '/development/call-core-services/embedding-model', + text: "嵌入模型", + link: "/development/call-core-services/embedding-model", }, { - text: '向量数据库', - link: '/development/call-core-services/vector-database', + text: "向量数据库", + link: "/development/call-core-services/vector-database", }, ], }, { - text: 'API 参考', + text: "API 参考", items: [ { - text: 'ChatLuna 服务 (ChatLuna Service)', - link: '/development/api-reference/chathub-service', + text: "ChatLuna 服务 (ChatLuna Service)", + link: "/development/api-reference/chathub-service", }, { - text: 'ChatLuna 中间件聊天链(ChatChain)', - link: '/development/api-reference/chathub-chat-chain', + text: "ChatLuna 中间件聊天链(ChatChain)", + link: "/development/api-reference/chathub-chat-chain", }, { - text: 'ChatLuna 插件(ChatLuna Plugin)', - link: '/development/api-reference/chathub-plugin', + text: "ChatLuna 插件(ChatLuna Plugin)", + link: "/development/api-reference/chathub-plugin", }, { - text: 'ChatLuna 大语言模型核心 (LLM Core)', + text: "ChatLuna 大语言模型核心 (LLM Core)", collapsed: true, items: [ { - text: '人格预设 (Preset Template)', - link: '/development/api-reference/llm-core/preset-template', + text: "人格预设 (Preset Template)", + link: "/development/api-reference/llm-core/preset-template", }, { - text: '平台 (Platform)', - link: '/development/api-reference/llm-core/platform', + text: "平台 (Platform)", + link: "/development/api-reference/llm-core/platform", }, { - text: '模型请求器 (Requester)', - link: '/development/api-reference/llm-core/requester', + text: "模型请求器 (Requester)", + link: "/development/api-reference/llm-core/requester", }, { - text: '模型 (Model)', - link: '/development/api-reference/llm-core/model', + text: "模型 (Model)", + link: "/development/api-reference/llm-core/model", }, { - text: '模型聊天接口 (Model Chat Interface)', - link: '/development/api-reference/llm-core/model-chat-interface', + text: "模型聊天接口 (Model Chat Interface)", + link: "/development/api-reference/llm-core/model-chat-interface", }, ], }, { - text: 'ChatLuna 辅助工具 (ChatLuna Utils)', + text: "ChatLuna 辅助工具 (ChatLuna Utils)", collapsed: true, items: [ { - text: '日志 (logger)', - link: '/development/api-reference/chathub-utils/logger', + text: "日志 (logger)", + link: "/development/api-reference/chathub-utils/logger", }, { - text: '请求工具 (request)', - link: '/development/api-reference/chathub-utils/request', + text: "请求工具 (request)", + link: "/development/api-reference/chathub-utils/request", }, ], }, @@ -420,14 +417,14 @@ function sidebarDevelopment(): DefaultTheme.SidebarItem[] { function nav() { return [ { - text: '使用教程', - link: '/guide/introduction', - activeMatch: '/guide/', + text: "使用教程", + link: "/guide/introduction", + activeMatch: "/guide/", }, { - text: '开发指南', - link: '/development/introduction', - activeMatch: '/development/', + text: "开发指南", + link: "/development/introduction", + activeMatch: "/development/", }, ]; } diff --git a/docs/.vitepress/theme/custom.css b/docs/.vitepress/theme/custom.css index c1729aff..cef0d4b7 100644 --- a/docs/.vitepress/theme/custom.css +++ b/docs/.vitepress/theme/custom.css @@ -7,4 +7,128 @@ color: white; border-radius: 10px; vertical-align: middle; -} \ No newline at end of file +} + +/* 背景模糊 */ +:root { + --vp-nav-bg-color: var(--vp-c-bg); + --vp-c-bg: #ffffffcc; + --vp-c-bg-elv: var(--vp-nav-bg-color); + --vp-c-bg-elv-up: #ffffffcc; + --vp-c-bg-elv-down: #f6f6f7cc; + --vp-c-bg-elv-mute: #f6f6f7cc; + --vp-c-bg-alt: #f6f6f7cc; + --vp-c-bg-soft: #f6f6f7cc; + --vp-c-bg-soft-up: #f9f9facc; + --vp-c-bg-soft-down: #e3e3e5cc; + --vp-c-bg-soft-mute: #e3e3e5cc; + --vp-c-mute: #f6f6f7cc; + --vp-c-mute-light: #f9f9fccc; + --vp-c-mute-lighter: #ffffffcc; + --vp-c-mute-dark: #e3e3e5cc; + --vp-c-mute-darker: #d7d7d9cc; + --vp-backdrop-bg-color: rgba(0, 0, 0, 0.1); + } + + .VPLocalNav .items, + .VPLocalNav::before, + .VPSidebar, + .VPFlyout .menu, + .shell, + .medium-zoom-image--opened, + .VPNavScreen { + backdrop-filter: blur(16px); + } + + /* 去除最内部的背景色,因为外部已经有一个半透明背景色了 */ + .VPNavBar:not(.has-sidebar) .content-body { + background: none !important; + } + + /* VPLocalNav与VPNavBar不能直接添加模糊,否则会使子元素失效 */ + .VPNav:not(.has-sidebar)::before, + .VPLocalNav::before, + .VPNavBar.has-sidebar .content-body::before { + content: ""; + position: absolute; + width: 100%; + height: 100%; + z-index: -1; + } + + /* 去除顶部空白 */ + .VPLocalNav.reached-top { + border-top: none; + } + + /* 将白色阴影改为下划线 */ + @media (min-width: 960px) { + .VPNavBar.has-sidebar .curtain { + height: 1px !important; + bottom: 0px !important; + border-bottom: 1px solid var(--vp-c-gutter); + } + + .VPNavBar.has-sidebar .curtain::before { + content: none !important; + } + } + + /* 背景作为分割线,但要使背景透明才行 */ + .VPLocalNav .items { + background: none; + } + + .VPFlyout .menu { + border-radius: 12px; + } + + /* 搜索框添加阴影 */ + .shell, + .medium-zoom-image--opened[style*="transform"] { + box-shadow: var(--vp-shadow-4); + } + + /* 选择器强度不够,标签名来凑 */ + img.medium-zoom-image { + transition: transform 0.3s cubic-bezier(0.2, 0, 0.2, 1), + box-shadow 0.3s cubic-bezier(0.2, 0, 0.2, 1) !important; + } + + @keyframes dialog-open { + from { + opacity: 0; + } + + to { + opacity: 1; + } + } + + .shell, + .backdrop { + animation: dialog-open 0.3s; + } + + .dark { + --vp-c-bg: #1e1e2099; + --vp-c-bg-elv: #25252966; + --vp-c-bg-elv-up: #31313666; + --vp-c-bg-elv-down: #1e1e2066; + --vp-c-bg-elv-mute: #31313666; + --vp-c-bg-alt: #16161866; + --vp-c-mute: #31313699; + --vp-c-mute-light: #3a3a3c99; + --vp-c-mute-lighter: #50505399; + --vp-c-mute-dark: #2c2c3099; + --vp-c-mute-darker: #25252999; + --vp-c-bg-soft: #25252999; + --vp-c-bg-soft-up: #32323899; + --vp-c-bg-soft-down: #1e1e2099; + --vp-c-bg-soft-mute: #32323899; + } + +/* .VPNav:not(.has-sidebar)::before, + .VPNavBar.has-sidebar .content-body::before { + background: var(--vp-c-bg-elv); + } */ \ No newline at end of file diff --git a/docs/guide/configure-model-platform/poe.md b/docs/guide/configure-model-platform/poe.md deleted file mode 100644 index e69de29b..00000000