Skip to content

Commit

Permalink
fix: update docs page props
Browse files Browse the repository at this point in the history
  • Loading branch information
mrderyk committed Sep 23, 2024
1 parent 43f01d6 commit 1593540
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
2 changes: 1 addition & 1 deletion docs/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions docs/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ import { ChangeEvent, useCallback, useState } from "react";
import ReactDOM from "react-dom";
import { BiLogoGithub } from "react-icons/bi";
import JsxParser from "react-jsx-parser";
import { ReactChatbot, SummaryLanguage, DEFAULT_SUMMARIZER, DEFAULT_RERANKER_ID, DEFAULT_LAMBDA_VALUE } from "@vectara/react-chatbot";
import {
ReactChatbot,
SummaryLanguage,
DEFAULT_SUMMARIZER,
DEFAULT_RERANKER_ID,
DEFAULT_LAMBDA_VALUE
} from "@vectara/react-chatbot";
import {
VuiAppContent,
VuiAppHeader,
Expand All @@ -22,7 +28,7 @@ import { HeaderLogo } from "./components/HeaderLogo";
import { ConfigurationDrawer } from "components/ConfigurationDrawer";
import "./ui/_index.scss";
import "./index.scss";
import {RerankerId} from "../../src/types";
import { RerankerId } from "../../src/types";

const formatStringProp = (value?: string) => {
if (!value) {
Expand All @@ -45,7 +51,7 @@ const generateCodeSnippet = (
exampleQuestions?: string,
rerankerId?: RerankerId,
lambda?: number,
isStreamingEnabled?: boolean,
isStreamingEnabled?: boolean
) => {
const props = [
`customerId="${customerId === "" ? "<Your Vectara customer ID>" : customerId}"`,
Expand Down Expand Up @@ -159,7 +165,7 @@ const App = () => {
);
}, [emptyStateJsx]);

const parsedExampleQuestions = exampleQuestions && exampleQuestions.split(",");
const parsedExampleQuestions = exampleQuestions ? exampleQuestions.split(",") : undefined;

return (
<>
Expand Down Expand Up @@ -212,7 +218,7 @@ const App = () => {
* This ensures that we don't voluntarily display the docs corpus details in the text fields.
*/}
<ReactChatbot
corpusKey={corpusKeys === "" ? DEFAULT_CORPUS_KEY : corpusKeys}
corpusKeys={corpusKeys === "" ? DEFAULT_CORPUS_KEY : corpusKeys}
customerId={customerId === "" ? DEFAULT_CUSTOMER_ID : customerId}
apiKey={apiKey === "" ? DEFAULT_API_KEY : apiKey}
title={title === "" ? undefined : title}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1593540

Please sign in to comment.