Files
Agents-Flex1/docs/.vitepress/config.ts

132 lines
18 KiB
TypeScript
Raw Normal View History

2025-08-27 19:57:07 +08:00
import {defineConfig} from 'vitepress'
const gitee_icon_svg = '\n' +
'<?xml version="1.0" encoding="UTF-8"?>\n' +
'<svg width="90px" height="90px" viewBox="0 0 90 90" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">\n' +
' <!-- Generator: Sketch 61.2 (89653) - https://sketch.com -->\n' +
' <title>Gitee</title>\n' +
' <g id="LOGO" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">\n' +
' <g id="Artboard" transform="translate(-532.000000, -431.000000)">\n' +
' <g id="logo" transform="translate(532.000000, 431.000000)">\n' +
' <g id="Group">\n' +
' <circle id="Combined-Shape" fill="#C71D23" cx="44.8544363" cy="44.8544363" r="44.8544363"></circle>\n' +
' <path d="M67.558546,39.8714292 L42.0857966,39.8714292 C40.8627004,39.8720094 39.8710953,40.8633548 39.8701949,42.0864508 L39.8687448,47.623783 C39.867826,48.8471055 40.8592652,49.8390642 42.0825879,49.8393845 C42.0827874,49.8393846 42.0829869,49.8393846 42.0831864,49.8387862 L57.5909484,49.838657 C58.8142711,49.8386283 59.8059783,50.830319 59.8059885,52.0536417 C59.8059885,52.0536479 59.8059885,52.053654 59.8059701,52.0536602 L59.8059701,52.6073539 L59.8059701,52.6073539 L59.8059701,53.161115 C59.8059701,56.8310831 56.8308731,59.80618 53.160905,59.80618 L32.1165505,59.80618 C30.8934034,59.806119 29.9018373,58.8145802 29.9017425,57.5914331 L29.9011625,36.5491188 C29.9008781,32.8791508 32.8758931,29.9039718 36.5458611,29.9038706 C36.5459222,29.9038706 36.5459833,29.9038706 36.5460443,29.9040538 L67.5523638,29.9040538 C68.77515,29.9026795 69.7666266,28.9118177 69.7687593,27.6890325 L69.7721938,22.1516997 C69.774326,20.928378 68.7832423,19.9360642 67.5599198,19.9353054 C67.5594619,19.9353051 67.5590039,19.935305 67.558546,19.9366784 L36.5479677,19.9366784 C27.3730474,19.9366784 19.935305,27.3744208 19.935305,36.549341 L19.935305,67.558546 C19.935305,68.7818687 20.927004,69.7735676 22.1503267,69.7735676 L54.8224984,69.7735676 C63.079746,69.7735676 69.7735676,63.079746 69.7735676,54.8224984 L69.7735676,42.0864509 C69.7735676,40.8631282 68.7818687,39.8714292 67.558546,39.8714292 Z" id="G" fill="#FFFFFF"></path>\n' +
' </g>\n' +
' <path d="M129.679951,79.4117647 C136.422068,79.4117647 141.804525,78.0966654 145.827321,75.4664668 C149.850118,72.8362683 151.861516,69.4304983 151.861516,65.249157 C151.861516,58.5050581 146.827402,55.1330086 136.759174,55.1330086 L136.759174,55.1330086 L130.556426,55.1330086 C128.488844,55.1330086 127.005578,54.9306857 126.106629,54.5260397 C125.20768,54.1213938 124.758206,53.4469839 124.758206,52.50281 C124.758206,51.5586362 125.050364,50.7718247 125.634681,50.1423754 C125.859418,49.8726115 126.151577,49.7826901 126.511156,49.8726115 C127.949474,50.2772574 129.320372,50.4795804 130.623848,50.4795804 C135.253434,50.4795804 139.017783,49.366804 141.916893,47.1412514 C144.816004,44.9156988 146.265559,41.6223305 146.265559,37.2611465 C146.265559,35.6425628 145.9734,34.2038217 145.389084,32.9449232 C145.344136,32.8550019 145.355373,32.7538404 145.422794,32.6414387 C145.490215,32.5290371 145.591347,32.4728363 145.726189,32.4728363 L145.726189,32.4728363 L147.276876,32.4728363 C148.400562,32.4728363 149.344459,32.0906707 150.108565,31.3263395 C150.872672,30.5620082 151.254725,29.6178344 151.254725,28.4938179 L151.254725,28.4938179 L151.254725,27.5496441 C151.254725,26.4705882 150.872672,25.5376546 150.108565,24.750843 C149.344459,23.9640315 148.400562,23.5706257 147.276876,23.5706257 L147.276876,23.5706257 L137.365964,23.5706257 C137.051332,23.5706257 136.714226,23.525665 136.354647,23.4357437 C134.601696,22.8962158 132.69143,22.6264519 130.623848,22.6264519 C127.702264,22.6264519 125.02789,23.1322593 122.600728,24.1438741 C120.173566,25.1554889 118.162168,26.7740727 116.566534,28.9996253 C114.970899,31.225178 114.173082,33.8666167 114.173082,36.9239416 C114.173082,39.0370925 114.667504,40.9704009 115.656348,42.7238666 C116.645192,44.4773323 117.881247,45.8935931 119.364512,46.9726489 C119.454407,47.0176096 119.499355,47.0850506 119.499355,47.1749719 C119.499355,47.2648932 119.454407,47.3548145 119.364512,47.4447359 C118.105984,48.343949 117.094666,49.434245 116.33056,50.7156238 C115.566453,51.9970026 115.1844,53.3121019 115.1844,54.6609217 C115.1844,57.5384039 116.33056,59.7639565 118.622879,61.3375796 C118.712774,61.3825403 118.757722,61.4612214 118.757722,61.5736231 C118.757722,61.6860247 118.712774,61.7871862 118.622879,61.8771075 C116.824982,62.7763207 115.465321,63.8778569 114.543899,65.181716 C113.622476,66.4855751 113.161765,67.9243162 113.161765,69.4979393 C113.161765,71.7459723 113.925871,73.63432 115.454084,75.1629824 C116.982298,76.6916448 118.948748,77.7819408 121.353437,78.4338704 C123.758125,79.0857999 126.53363,79.4117647 129.679951,79.4117647 Z M130.623848,43.0610716 C129.140582,43.0610716 127.938238,42.5327838 127.016815,41.4762083 C126.095392,40.4196328 125.634681,38.9022106 125.634681,36.9239416 C125.634681,34.9906332 126.095392,33.4956913 127.016815,32.4391158 C127.938238,31.3825403 129.140582,30.8542525 130.623848,30.8542525 C132.107113,30.8542525 133.309457,31.3713001 134.23088,32.4053953 C135.152303,33.4394904 135.613014,34.9456725 135.613014,36.9239416 C135.613014,38.9022106 135.152303,40.4196328 134.23088,41.4762083 C133.309457,42.5327838 132.107113,43.0610716 130.623848,43.0610716 Z M131.567744,71.7234919 C129.005739,71.7234919 126.971868,71.3750468 125.466128,70.6781566 C123.960389,69.9812664 123.207519,68.9359311 123.207519,67.5421506 C123.207519,66.4181341 123.724415,65.3615586 124.758206,64.3724241 C124.893048,64.2375422 125.095312,64.1701012 125.364996,64.1701012 L125.364996,64.1701012 L125.56726,64.1701012 C126.690946,64.3949045 128.398949,64.5073061 130.691269,64.5073061 L130.691269,64.5073061 L134.399433,64.5073061 C136.377121,64.5073061 137.826676,64.7096291 138.748098,65.114275 C139.669521,65.5189209 140.130232,66.2607718 140.130232,67.3398277 C140.130232,68.5987261 139.332415,69.6440614 137.736781,70.4758336 C136.141147,71.3076058 134.084801,71.7234919 131.567744,71.7234919 Z M164.19959,17.9055826 C166.222225,17.9055826 167.88528,17.321094 169.188756,16.1521169 C170.492232,14.9831398 171.14397,13.4769577 171.14397,11.6335706 C171.14397,9.79018359 170.492232,8.272761
' </g>\n' +
' </g>\n' +
' </g>\n' +
'</svg>'
// https://vitepress.dev/reference/site-config
export default defineConfig({
title: "Agents-Flex",
// titleTemplate: ':title - Agents-Flex Official website',
// description: "A Java framework for LLM applications",
titleTemplate: ':title - Agents-Flex 官方网站',
description: "一个优雅的 LLM大语言模型应用开发框架",
lastUpdated: true,
appearance:"dark",
themeConfig: {
search: {
provider: 'local'
},
socialLinks: [
{ icon: {svg:gitee_icon_svg}, link: 'https://gitee.com/agents-flex/agents-flex' },
{ icon: 'github', link: 'https://github.com/agents-flex/agents-flex' },
],
outline: {
label: '当前页导航',
level: 'deep'
},
editLink: {
pattern: 'https://gitee.com/agents-flex/agents-flex/edit/main/docs/:path',
text: '编辑当前页面'
},
nav: [
{text: '首页', link: '/'},
{text: '帮助文档', link: '/zh/intro/what-is-agentsflex'},
{text: 'ChangeLog', link: '/changes.md'},
],
sidebar: [
{
text: '快速开始',
items: [
{text: 'Agents-Flex 是什么', link: '/zh/intro/what-is-agentsflex'},
{text: '核心概念', link: '/zh/intro/concepts'},
{text: '快速开始', link: '/zh/intro/getting-started'},
{text: 'Maven 依赖', link: '/zh/intro/maven'},
{text: '微信交流群', link: '/zh/intro/communication'},
]
},
{
text: '核心模块',
items: [
{text: 'LLMs 大语言模型', link: '/zh/core/llms'},
{text: 'Prompt 提示词', link: '/zh/core/prompt'},
// {text: 'Chat 对话', link: '/zh/core/chat'},
// {text: 'Function Calling 方法调用', link: '/zh/core/function-calling'},
{text: 'Memory 记忆', link: '/zh/core/memory'},
{text: 'Embedding 嵌入', link: '/zh/core/embedding'},
{text: 'Store 存储', link: '/zh/core/store'},
{text: 'Document 文档', link: '/zh/core/document'},
{text: 'Image 图片生成', link: '/zh/core/image'},
{text: 'SearchEngine 搜索引擎', link: '/zh/core/search-engine'},
{text: 'Chain 执行链', link: '/zh/core/chain'},
]
},
// {
// text: '基础示例',
// items: [
// {text: '简单对话', link: '/zh/samples/chat'},
// {text: '历史对话', link: '/zh/samples/chat-with-memory'},
// {text: 'RAG 应用', link: '/zh/samples/rag'},
// ]
// }
],
footer: {
message: 'Released under the Apache License.',
copyright: 'Copyright © 2022-present Agents-Flex. ' +
'<span style="display: flex;align-items: center;justify-content: center;">' +
'<span style="font-size: 12px;margin-right:10px;"><a style="color:#777" target="_blank" rel="noopener" href="http://beian.miit.gov.cn/">黔ICP备19009310号-13 </a></span>' +
'</span>'
}
},
head: [
[
'link', {rel: 'icon', href: '/assets/images/logo02.png'}
],
[// 添加百度统计
"script",
{},
`
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?88ab4cfa533c8000717a434501beba56";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
`
],
[// 自动跳转 https
"script",
{},
`
if (location.protocol !== 'https:' && location.hostname != 'localhost') {
location.href = 'https://' + location.hostname + location.pathname + location.search;
}
`
]
],
})