Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 45 additions & 6 deletions apps/chatbot-server/package-lock.json

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

1 change: 0 additions & 1 deletion apps/chatbot-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
"ts-node": "^10.9.2"
},
"dependencies": {
"@emotion/css": "^11.13.5",
"jsdom": "^26.1.0"
}
}
2 changes: 1 addition & 1 deletion apps/chatbot-server/packages/ingest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
},
"devDependencies": {
"dotenv": "^16.3.1",
"typescript": "^5.3.3"
"typescript": "~4.9.0"
}
}
1 change: 0 additions & 1 deletion apps/chatbot-server/packages/ingest/src/ingest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import { mongoDbChatbotFrameworkDocsDataSourceConstructor } from './mongodbChatb
// Load project environment variables
const dotenvPath = path.join(__dirname, '..', '..', '..', '.env'); // .env at project root
const {
// BRAINTRUST_API_KEY,
MONGODB_CONNECTION_URI,
MONGODB_DATABASE_NAME,
OPENAI_API_KEY,
Expand Down
2 changes: 0 additions & 2 deletions apps/chatbot-server/packages/ingest/src/loadEnvVars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import dotenv from 'dotenv';
export function loadEnvVars(path: string) {
dotenv.config({ path });
const {
BRAINTRUST_API_KEY,
MONGODB_CONNECTION_URI,
MONGODB_DATABASE_NAME,
VECTOR_SEARCH_INDEX_NAME,
Expand All @@ -22,7 +21,6 @@ export function loadEnvVars(path: string) {
assert(OPENAI_API_KEY, 'OPENAI_API_KEY is required');
assert(OPENAI_EMBEDDING_MODEL, 'OPENAI_EMBEDDING_MODEL is required');
return {
BRAINTRUST_API_KEY,
MONGODB_CONNECTION_URI,
MONGODB_DATABASE_NAME,
VECTOR_SEARCH_INDEX_NAME,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/**
@fileoverview Data source for the MongoDB Chatbot Framework docs.
*/
import {
makeMdOnGithubDataSource,
MakeMdOnGithubDataSourceParams,
Expand Down
2 changes: 1 addition & 1 deletion apps/chatbot-server/packages/server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"devDependencies": {
"dotenv": "^16.3.1",
"nodemon": "^3.0.1",
"typescript": "^5.3.3"
"typescript": "~4.9.0"
},
"dependencies": {
"@types/node": "^16.0.0",
Expand Down
1 change: 0 additions & 1 deletion apps/chatbot-server/packages/server/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ const llm = makeOpenAiChatLlm({
deployment: OPENAI_CHAT_COMPLETION_MODEL,
openAiLmmConfigOptions: {
temperature: 0.5,
// max_tokens: 500,
},
});

Expand Down
2 changes: 1 addition & 1 deletion apps/chatbot-server/packages/ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"eslint": "^8.55.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.5",
"typescript": "^5.2.2",
"typescript": "~4.9.0",
"vite": "^5.0.8"
}
}
21 changes: 2 additions & 19 deletions apps/chatbot-server/packages/ui/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,43 +4,26 @@ import Chatbot, {
ModalView,
} from 'mongodb-chatbot-ui';

// import { css } from '@emotion/css';

const suggestedPrompts = [
'Why should I use the MongoDB Chatbot Framework?',
'How does the framework use Atlas Vector Search?',
'Do you support using LLMs from OpenAI?',
];

function MyApp() {
// const [open, setOpen] = useState(false);

function App() {
return (
<div>
<Chatbot darkMode={true} serverBaseUrl="http://localhost:3000/api/v1">
<>
{/* <InputBarTrigger suggestedPrompts={suggestedPrompts} /> */}
{/* <div onClick={(current) => setOpen(!current)}> */}
<FloatingActionButtonTrigger text="Ask LeafyGreen AI" />
{/* </div> */}
<ModalView
initialMessageText="Welcome to MongoDB AI Assistant. What can I help you with?"
initialMessageSuggestedPrompts={suggestedPrompts}
/>
{/* {open && (
<ChatWindow
className={css`width: 700px; position: fixed; bottom: 0; right: 0; margin-bottom: 48px;`}
inputBarId="my-input-bar"
inputBarPlaceholder="Ask me anything about MongoDB"
inputBottomText="Powered by MongoDB Atlas Vector Search"
initialMessageText="Welcome to MongoDB AI Assistant. What can I help you with?"
initialMessageSuggestedPrompts={suggestedPrompts}
/>
)} */}
</>
</Chatbot>
</div>
);
}

export default MyApp;
export default App;
23 changes: 4 additions & 19 deletions apps/chatbot-server/packages/ui/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
{
"$schema": "https://json.schemastore.org/tsconfig",
"extends": "@lg-tools/build/config/root.tsconfig.json",
"compilerOptions": {
"target": "ES2020",
"useDefineForClassFields": true,
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"module": "ESNext",
"skipLibCheck": true,

/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"resolveJsonModule": true,
"isolatedModules": true,
"noEmit": true,
"jsx": "react-jsx",

/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
"baseUrl": ".",
},
"include": ["src"],
"exclude": ["node_modules", "**/dist"],
"references": [{ "path": "./tsconfig.node.json" }]
}