Skip to content

Commit e4720ba

Browse files
committed
Update AI search module
1 parent 4dfb8df commit e4720ba

File tree

3 files changed

+44
-6
lines changed

3 files changed

+44
-6
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"classnames": "^2.5.1",
3434
"clsx": "^1.2.1",
3535
"copy-to-clipboard": "^3.3.3",
36-
"docusaurus-openai-search": "^4.0.1",
36+
"docusaurus-openai-search": "^5.1.1",
3737
"gray-matter": "^4.0.3",
3838
"hast-util-is-element": "^1.1.0",
3939
"joi": "^17.13.3",

src/theme/SearchBar/index.tsx

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,49 @@ export default function SearchBar() {
3131
showSearchButtonShortcut: false,
3232
useCustomSearchButton: true,
3333
},
34-
enableLogging: true,
34+
enableLogging: false,
3535
enableCaching: true,
3636
recaptcha: {
3737
siteKey: "6LeotlkrAAAAAEREf2umQgDoO2l3zfqUdJR599LV",
3838
},
39+
features: {
40+
// Conversational memory for context-aware follow-up questions
41+
conversationalMemory: {
42+
enabled: true,
43+
sessionDuration: 3600, // Session duration in seconds (default: 1 hour)
44+
},
45+
46+
// Multi-source search (GitHub, blog, changelog integration)
47+
multiSource: {
48+
enabled: true,
49+
// GitHub integration for issues and discussions
50+
github: {
51+
repo: "Web3Auth/web3auth-web", // Your GitHub repository
52+
// Note: GitHub Personal Access Token should be configured in the backend environment
53+
// as GITHUB_TOKEN for security reasons
54+
searchTypes: ["issues", "discussions"], // What to search
55+
maxResults: 5, // Max results from GitHub (default: 5)
56+
},
57+
// Blog search integration
58+
blog: {
59+
url: "https://blog.web3auth.io",
60+
platform: "ghost", // 'wordpress', 'ghost', 'medium', or 'generic'
61+
maxResults: 3, // Max blog posts to include (default: 3)
62+
},
63+
// Source weighting for result aggregation
64+
aggregationWeights: {
65+
documentation: 0.8, // Primary weight for docs
66+
github: 0.1, // Secondary weight for GitHub
67+
blog: 0.1, // Tertiary weight for blog
68+
},
69+
},
70+
71+
// Other advanced features
72+
queryUnderstanding: true, // Enhanced query analysis (default: true)
73+
intelligentRanking: true, // Smart result ranking (default: true)
74+
followUpSuggestions: true, // Generate follow-up questions (default: true)
75+
qualityScoring: true, // Answer quality assessment (default: true)
76+
},
3977
};
4078
// @ts-ignore
4179
return <DocusaurusAISearch themeConfig={themeConfig} aiConfig={aiConfig} />;

0 commit comments

Comments
 (0)