Skip to content

Commit a675222

Browse files
tsckTheSonOfThomp
authored andcommitted
Refactor package dependencies and clean up unused code (#2847)
1 parent eb699fe commit a675222

File tree

11 files changed

+54
-55
lines changed

11 files changed

+54
-55
lines changed

apps/chatbot-server/package-lock.json

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

apps/chatbot-server/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"ts-node": "^10.9.2"
2121
},
2222
"dependencies": {
23-
"@emotion/css": "^11.13.5",
2423
"jsdom": "^26.1.0"
2524
}
2625
}

apps/chatbot-server/packages/ingest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
},
1515
"devDependencies": {
1616
"dotenv": "^16.3.1",
17-
"typescript": "^5.3.3"
17+
"typescript": "~4.9.0"
1818
}
1919
}

apps/chatbot-server/packages/ingest/src/ingest.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import { mongoDbChatbotFrameworkDocsDataSourceConstructor } from './mongodbChatb
1414
// Load project environment variables
1515
const dotenvPath = path.join(__dirname, '..', '..', '..', '.env'); // .env at project root
1616
const {
17-
// BRAINTRUST_API_KEY,
1817
MONGODB_CONNECTION_URI,
1918
MONGODB_DATABASE_NAME,
2019
OPENAI_API_KEY,

apps/chatbot-server/packages/ingest/src/loadEnvVars.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import dotenv from 'dotenv';
99
export function loadEnvVars(path: string) {
1010
dotenv.config({ path });
1111
const {
12-
BRAINTRUST_API_KEY,
1312
MONGODB_CONNECTION_URI,
1413
MONGODB_DATABASE_NAME,
1514
VECTOR_SEARCH_INDEX_NAME,
@@ -22,7 +21,6 @@ export function loadEnvVars(path: string) {
2221
assert(OPENAI_API_KEY, 'OPENAI_API_KEY is required');
2322
assert(OPENAI_EMBEDDING_MODEL, 'OPENAI_EMBEDDING_MODEL is required');
2423
return {
25-
BRAINTRUST_API_KEY,
2624
MONGODB_CONNECTION_URI,
2725
MONGODB_DATABASE_NAME,
2826
VECTOR_SEARCH_INDEX_NAME,

apps/chatbot-server/packages/ingest/src/mongodbChatbotFrameworkDataSource.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
/**
2-
@fileoverview Data source for the MongoDB Chatbot Framework docs.
3-
*/
41
import {
52
makeMdOnGithubDataSource,
63
MakeMdOnGithubDataSourceParams,

apps/chatbot-server/packages/server/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"devDependencies": {
1515
"dotenv": "^16.3.1",
1616
"nodemon": "^3.0.1",
17-
"typescript": "^5.3.3"
17+
"typescript": "~4.9.0"
1818
},
1919
"dependencies": {
2020
"@types/node": "^16.0.0",

apps/chatbot-server/packages/server/src/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ const llm = makeOpenAiChatLlm({
3939
deployment: OPENAI_CHAT_COMPLETION_MODEL,
4040
openAiLmmConfigOptions: {
4141
temperature: 0.5,
42-
// max_tokens: 500,
4342
},
4443
});
4544

apps/chatbot-server/packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"eslint": "^8.55.0",
2424
"eslint-plugin-react-hooks": "^4.6.0",
2525
"eslint-plugin-react-refresh": "^0.4.5",
26-
"typescript": "^5.2.2",
26+
"typescript": "~4.9.0",
2727
"vite": "^5.0.8"
2828
}
2929
}

apps/chatbot-server/packages/ui/src/App.tsx

Lines changed: 2 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,43 +4,26 @@ import Chatbot, {
44
ModalView,
55
} from 'mongodb-chatbot-ui';
66

7-
// import { css } from '@emotion/css';
8-
97
const suggestedPrompts = [
108
'Why should I use the MongoDB Chatbot Framework?',
119
'How does the framework use Atlas Vector Search?',
1210
'Do you support using LLMs from OpenAI?',
1311
];
1412

15-
function MyApp() {
16-
// const [open, setOpen] = useState(false);
17-
13+
function App() {
1814
return (
1915
<div>
2016
<Chatbot darkMode={true} serverBaseUrl="http://localhost:3000/api/v1">
2117
<>
22-
{/* <InputBarTrigger suggestedPrompts={suggestedPrompts} /> */}
23-
{/* <div onClick={(current) => setOpen(!current)}> */}
2418
<FloatingActionButtonTrigger text="Ask LeafyGreen AI" />
25-
{/* </div> */}
2619
<ModalView
2720
initialMessageText="Welcome to MongoDB AI Assistant. What can I help you with?"
2821
initialMessageSuggestedPrompts={suggestedPrompts}
2922
/>
30-
{/* {open && (
31-
<ChatWindow
32-
className={css`width: 700px; position: fixed; bottom: 0; right: 0; margin-bottom: 48px;`}
33-
inputBarId="my-input-bar"
34-
inputBarPlaceholder="Ask me anything about MongoDB"
35-
inputBottomText="Powered by MongoDB Atlas Vector Search"
36-
initialMessageText="Welcome to MongoDB AI Assistant. What can I help you with?"
37-
initialMessageSuggestedPrompts={suggestedPrompts}
38-
/>
39-
)} */}
4023
</>
4124
</Chatbot>
4225
</div>
4326
);
4427
}
4528

46-
export default MyApp;
29+
export default App;

0 commit comments

Comments
 (0)