Skip to content

Commit 9dfcb66

Browse files
committed
Update to v2
1 parent 42c37e6 commit 9dfcb66

File tree

3 files changed

+60
-14
lines changed

3 files changed

+60
-14
lines changed

package-lock.json

Lines changed: 52 additions & 5 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": "^1.4.0",
36+
"docusaurus-openai-search": "^2.0.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: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,7 @@ import useDocusaurusContext from "@docusaurus/useDocusaurusContext";
44

55
export default function SearchBar() {
66
const {
7-
siteConfig: {
8-
themeConfig: { algolia },
9-
},
7+
siteConfig: { themeConfig },
108
} = useDocusaurusContext();
119

1210
const apiKey = typeof window !== "undefined" ? (window as any).OPENAI_API_KEY || "" : "";
@@ -23,8 +21,8 @@ export default function SearchBar() {
2321
"7. NEVER SAY JUST 'NO SPECIFIC INSTRUCTIONS': Always provide related information or suggest alternative approaches.\n\n" +
2422
"ABOUT WEB3AUTH:\n" +
2523
"- Web3Auth provides authentication infrastructure for Web3 applications\n" +
26-
"- Core products include Plug and Play (PnP) SDKs for Web, Mobile (Android, iOS, React Native, Flutter) and Gaming (Unity & Unreal Engine). Single Factor Auth (SFA) for Mobile & Backend, MPC Core Kit SDK for Web and React Native.\n" +
27-
"- The most used SDKs are Plug and Play Web Modal and No Modal SDKs, which have React Hook and Vue Composables as well." +
24+
"- Core products include Plug and Play (PnP) SDKs for Web, Mobile (Android, iOS, React Native, Flutter) and Gaming (Unity & Unreal Engine). Single Factor Auth (SFA) for Mobile & Backend, MPC Core Kit SDK (enterprise only sdk) for Web and React Native.\n" +
25+
"- Try to recommend solutions with Plug and Play Web Modal and No Modal SDKs as much as possible, which have React Hooks and Vue Composables as well." +
2826
"- Uses Shamir Secret Sharing (SSS) for PnP & SFA and Threshold Signature Scheme (TSS) - MPC for MPC Core Kit for enabling secure key management\n" +
2927
"- Compatible with all OAuth2 providers like Google, Facebook, Discord, Auth0, Firebase, etc., while having the ability to connect to any custom OAuth provider.";
3028

@@ -33,8 +31,8 @@ export default function SearchBar() {
3331
// OpenAI API settings
3432
openAI: {
3533
apiKey,
36-
model: "gpt-4.1",
37-
maxTokens: 10000,
34+
model: "gpt-4.1-nano",
35+
maxTokens: 32768,
3836
temperature: 0.3,
3937
},
4038
// UI customization
@@ -47,8 +45,9 @@ export default function SearchBar() {
4745
prompts: {
4846
siteName: "Web3Auth",
4947
systemPrompt,
48+
useSummarization: false,
5049
},
5150
};
5251
// @ts-ignore
53-
return <DocusaurusAISearch algoliaConfig={algolia} aiConfig={aiConfig} />;
52+
return <DocusaurusAISearch themeConfig={themeConfig} aiConfig={aiConfig} />;
5453
}

0 commit comments

Comments
 (0)