|
| 1 | +import { createRequire } from 'module' |
| 2 | +import { defineConfig, type DefaultTheme } from 'vitepress' |
| 3 | + |
| 4 | +const require = createRequire(import.meta.url) |
| 5 | +const pkg = require('vitepress/package.json') |
| 6 | + |
| 7 | +export const en = defineConfig({ |
| 8 | + lang: 'en-US', |
| 9 | + description: 'BotSharp is an open source application framework', |
| 10 | + |
| 11 | + themeConfig: { |
| 12 | + nav: nav(), |
| 13 | + |
| 14 | + sidebar: { |
| 15 | + '/guide/': { base: '/guide/', items: sidebarGuide() }, |
| 16 | + '/reference/': { base: '/reference/', items: sidebarReference() } |
| 17 | + }, |
| 18 | + |
| 19 | + editLink: { |
| 20 | + pattern: 'https://github.com/GreenShadeZhang/botsharp-doc/:path', |
| 21 | + text: 'Edit this page on GitHub' |
| 22 | + }, |
| 23 | + |
| 24 | + footer: { |
| 25 | + message: 'Released under the MIT License.', |
| 26 | + copyright: 'Copyright Since 2018, SciSharp STACK.' |
| 27 | + } |
| 28 | + } |
| 29 | +}) |
| 30 | + |
| 31 | +function nav(): DefaultTheme.NavItem[] { |
| 32 | + return [ |
| 33 | + { |
| 34 | + text: 'Guide', |
| 35 | + link: '/guide/quick-start/get-started', |
| 36 | + activeMatch: '/guide/' |
| 37 | + }, |
| 38 | + { |
| 39 | + text: 'Reference', |
| 40 | + link: '/reference/cli', |
| 41 | + activeMatch: '/reference/' |
| 42 | + }, |
| 43 | + { |
| 44 | + text: '4.0', |
| 45 | + items: [ |
| 46 | + { |
| 47 | + text: 'Changelog', |
| 48 | + link: 'https://github.com/SciSharp/BotSharp/releases/' |
| 49 | + }, |
| 50 | + { |
| 51 | + text: 'Contributing', |
| 52 | + link: 'https://github.com/SciSharp/BotSharp/graphs/contributors' |
| 53 | + } |
| 54 | + ] |
| 55 | + } |
| 56 | + ] |
| 57 | +} |
| 58 | + |
| 59 | +function sidebarGuide(): DefaultTheme.SidebarItem[] { |
| 60 | + return [ |
| 61 | + { |
| 62 | + text: 'Get Started with BotSharp', |
| 63 | + collapsed: false, |
| 64 | + items: [ |
| 65 | + { text: 'Overview', link: 'quick-start/overview' }, |
| 66 | + { text: 'Get Started', link: 'quick-start/get-started' }, |
| 67 | + { text: 'Installation', link: 'quick-start/installation' }, |
| 68 | + ] |
| 69 | + }, |
| 70 | + { |
| 71 | + text: 'Agent', |
| 72 | + collapsed: false, |
| 73 | + items: [ |
| 74 | + { text: 'Agent Introduction', link: 'agent/intro' }, |
| 75 | + { text: 'Router', link: 'agent/router' }, |
| 76 | + { text: 'Agent Hook', link: 'agent/hook' } |
| 77 | + ] |
| 78 | + }, |
| 79 | + { |
| 80 | + text: 'Conversation', |
| 81 | + collapsed: false, |
| 82 | + items: [ |
| 83 | + { text: 'Conversation', link: 'conversation/intro' }, |
| 84 | + { |
| 85 | + text: 'Conversation State', |
| 86 | + link: 'conversation/state' |
| 87 | + }, |
| 88 | + { text: 'Conversation Hook', link: 'conversation/hook' } |
| 89 | + ] |
| 90 | + }, |
| 91 | + { |
| 92 | + text: 'Interactive Channels', |
| 93 | + collapsed: false, |
| 94 | + items: [ |
| 95 | + { text: 'Channel Introduction', link: 'channels/intro' }, |
| 96 | + { text: 'Messaging Components', link: 'channels/components' }, |
| 97 | + { text: 'Messenger', link: 'channels/messenger' }, |
| 98 | + { text: 'WeChat', link: 'channels/wechat' } |
| 99 | + ] |
| 100 | + }, |
| 101 | + { |
| 102 | + text: 'Knowledge Base', |
| 103 | + collapsed: false, |
| 104 | + items: [ |
| 105 | + { text: 'Text Embedding', link: 'knowledge-base/text-embedding' }, |
| 106 | + { text: 'Vector Database', link: 'knowledge-base/vector-database' }, |
| 107 | + { text: 'Similarity Search', link: 'knowledge-base/similarity-search' }, |
| 108 | + { text: 'Build Q&A Bot', link: 'knowledge-base/build-qa-bot' } |
| 109 | + ] |
| 110 | + }, |
| 111 | + { |
| 112 | + text: 'Prompt Engineering', |
| 113 | + collapsed: false, |
| 114 | + items: [ |
| 115 | + { text: 'Prompt Engineering', link: 'llm/prompt' }, |
| 116 | + { text: 'Template', link: 'llm/template' }, |
| 117 | + { text: 'Function', link: 'llm/function' }, |
| 118 | + { text: 'Few-Shot Learning', link: 'llm/few-shot-learning' } |
| 119 | + ] |
| 120 | + }, |
| 121 | + { |
| 122 | + text: 'Use Local LLM Models', |
| 123 | + collapsed: false, |
| 124 | + items: [ |
| 125 | + { text: 'Config LLamaSharp', link: 'llama-sharp/config-llamasharp' }, |
| 126 | + { text: 'Use LLamaSharp in BotSharp', link: 'llama-sharp/use-llamasharp-in-ui' } |
| 127 | + ] |
| 128 | + }, |
| 129 | + { |
| 130 | + text: 'Architecture', |
| 131 | + collapsed: false, |
| 132 | + items: [ |
| 133 | + { text: 'Authentication', link: 'architecture/authentication' }, |
| 134 | + { text: 'Plug-in', link: 'architecture/plugin' }, |
| 135 | + { text: 'Hooks', link: 'architecture/hooks' }, |
| 136 | + { text: 'Routing', link: 'architecture/routing' }, |
| 137 | + { text: 'Agent Utility', link: 'architecture/agent-utility' }, |
| 138 | + { text: 'Logging', link: 'architecture/logging' }, |
| 139 | + { text: 'Data Storage', link: 'architecture/data-persistence' } |
| 140 | + ] |
| 141 | + }, |
| 142 | + { |
| 143 | + text: 'Utilities', |
| 144 | + collapsed: false, |
| 145 | + items: [ |
| 146 | + { text: 'Local Whisper', link: 'utilities/local-whisper' } |
| 147 | + ] |
| 148 | + }, |
| 149 | + ] |
| 150 | +} |
| 151 | + |
| 152 | +function sidebarReference(): DefaultTheme.SidebarItem[] { |
| 153 | + return [ |
| 154 | + { |
| 155 | + text: 'Reference', |
| 156 | + items: [ |
| 157 | + { text: 'CLI', link: 'cli' } |
| 158 | + ] |
| 159 | + } |
| 160 | + ] |
| 161 | +} |
0 commit comments