Skip to content

Refactor chatbot initialization to use Credal for LLM interactions #2857

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 11 commits into
base: integration/chat
Choose a base branch
from

Conversation

tsck
Copy link
Collaborator

@tsck tsck commented May 13, 2025

No description provided.

bruugey and others added 11 commits May 8, 2025 10:23
* pnpm

* Update pnpm-workspace.yaml

* Delete package-lock.json
* Add initial package.json for chatbot-server

* feat(ui): initialize chatbot UI with React and Vite (#2841)

* feat(ui): initialize chatbot UI with React and Vite

- Added package.json for UI package with scripts and dependencies.
- Created App.css for styling the main application layout.
- Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
- Added a React SVG asset for branding.
- Created index.css for global styles and theming.
- Set up main.tsx as the entry point for the React application.
- Added vite-env.d.ts for Vite type definitions.
- Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
- Created vite.config.ts for Vite configuration with React plugin.

* fix: update license to Apache-2.0 and refactor import statements for consistency

* feat(ui): initialize chatbot UI with React and Vite

- Added package.json for UI package with scripts and dependencies.
- Created App.css for styling the main application layout.
- Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
- Added a React SVG asset for branding.
- Created index.css for global styles and theming.
- Set up main.tsx as the entry point for the React application.
- Added vite-env.d.ts for Vite type definitions.
- Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
- Created vite.config.ts for Vite configuration with React plugin.

* fix: update license to Apache-2.0 and refactor import statements for consistency

* feat(ingest): add initial configuration and data sources for chatbot ingestion

* update configs

* feat(ingest): implement data sources for LeafyGreen UI and MongoDB Chatbot Framework

* chore: update pnpm workspace configuration to include 'apps/*' directory

* feat(ingest): update ingest configuration to use Azure OpenAI and add loadEnv utility

* feat(ingest): enhance environment variable loading and add MongoDB chatbot framework data source

* feat(ingest): add data sources for LeafyGreen UI and MongoDB Chatbot Framework, and refactor Azure OpenAI embedder

* feat(ingest): remove MongoDB connection URI from example environment file

* feat: remove ts-node from devDependencies and update package versions in pnpm-lock.yaml

* feat(ingest): add MongoDB Design website data source and integrate into ingest configuration

* Update pnpm-lock.yaml

* Delete package-lock.json

* reset ui

* Update .env.example

* rm wip web loader

---------

Co-authored-by: Terrence Keane <[email protected]>
* feat(ui): initialize chatbot UI with React and Vite (#2841)

* feat(ui): initialize chatbot UI with React and Vite

- Added package.json for UI package with scripts and dependencies.
- Created App.css for styling the main application layout.
- Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
- Added a React SVG asset for branding.
- Created index.css for global styles and theming.
- Set up main.tsx as the entry point for the React application.
- Added vite-env.d.ts for Vite type definitions.
- Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
- Created vite.config.ts for Vite configuration with React plugin.

* fix: update license to Apache-2.0 and refactor import statements for consistency

* feat(ui): initialize chatbot UI with React and Vite

- Added package.json for UI package with scripts and dependencies.
- Created App.css for styling the main application layout.
- Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
- Added a React SVG asset for branding.
- Created index.css for global styles and theming.
- Set up main.tsx as the entry point for the React application.
- Added vite-env.d.ts for Vite type definitions.
- Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
- Created vite.config.ts for Vite configuration with React plugin.

* fix: update license to Apache-2.0 and refactor import statements for consistency

* feat(ingest): add initial configuration and data sources for chatbot ingestion

* update configs

* feat(ingest): implement data sources for LeafyGreen UI and MongoDB Chatbot Framework

* chore: update pnpm workspace configuration to include 'apps/*' directory

* feat(ingest): add data sources for LeafyGreen UI and MongoDB Chatbot Framework, and refactor Azure OpenAI embedder

* feat(ingest): add MongoDB Design website data source and integrate into ingest configuration

* Delete package-lock.json

* reset ui

* feat(crawler): export LoadedPageContents and ProcessSingleUrl interfaces

* feat(crawler): refactor crawling logic to use processLangchainDocument and update allowedDomains format

* feat(crawler): update recursive crawl logic to process documents with processLangchainDocument

* feat(crawler): update package.json exports and refactor lodash imports

* feat(crawler): implement createWebSourceConstructor and update ingest configuration

* Update ingest.config.ts

* feat(crawler): replace createWebSourceConstructor with webSourceConstructor and update data sources

* fix(crawler): handle invalid URLs in newURL and recursive crawl logic

* Resolve tsconfig.json

---------

Co-authored-by: Terrence Keane <[email protected]>
* feat(ui): initialize chatbot UI with React and Vite (#2841)

* feat(ui): initialize chatbot UI with React and Vite

- Added package.json for UI package with scripts and dependencies.
- Created App.css for styling the main application layout.
- Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
- Added a React SVG asset for branding.
- Created index.css for global styles and theming.
- Set up main.tsx as the entry point for the React application.
- Added vite-env.d.ts for Vite type definitions.
- Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
- Created vite.config.ts for Vite configuration with React plugin.

* fix: update license to Apache-2.0 and refactor import statements for consistency

* feat(ui): initialize chatbot UI with React and Vite

- Added package.json for UI package with scripts and dependencies.
- Created App.css for styling the main application layout.
- Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
- Added a React SVG asset for branding.
- Created index.css for global styles and theming.
- Set up main.tsx as the entry point for the React application.
- Added vite-env.d.ts for Vite type definitions.
- Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
- Created vite.config.ts for Vite configuration with React plugin.

* fix: update license to Apache-2.0 and refactor import statements for consistency

* feat(ingest): add initial configuration and data sources for chatbot ingestion

* update configs

* feat(ingest): implement data sources for LeafyGreen UI and MongoDB Chatbot Framework

* chore: update pnpm workspace configuration to include 'apps/*' directory

* feat(ingest): add data sources for LeafyGreen UI and MongoDB Chatbot Framework, and refactor Azure OpenAI embedder

* feat(ingest): add MongoDB Design website data source and integrate into ingest configuration

* Delete package-lock.json

* reset ui

* feat(crawler): implement createWebSourceConstructor and update ingest configuration

* Update ingest.config.ts

* feat(crawler): replace createWebSourceConstructor with webSourceConstructor and update data sources

* fix(crawler): handle invalid URLs in newURL and recursive crawl logic

* mv ui & server

* Refactor code structure for improved readability and maintainability

* feat(ingest): add UMD configuration and update TypeScript settings

* Updates package config

* feat(chatbot): integrate Azure OpenAI services and update environment variable loading

* feat(chatbot): refactor chatbot initialization and update server configuration

* fix: update ingest script path and improve TypeScript configuration

* feat(ingest): refactor Azure OpenAI embedder integration and remove unused constructor

* fix: update mongodb-chatbot-server and mongodb-rag-core dependencies to latest versions

* Squashed commit of the following:

commit 3eec08f
Author: Adam Thompson <[email protected]>
Date:   Fri May 9 10:46:31 2025 -0400

    Ingest with recursive crawler (#2849)

    * feat(ui): initialize chatbot UI with React and Vite (#2841)

    * feat(ui): initialize chatbot UI with React and Vite

    - Added package.json for UI package with scripts and dependencies.
    - Created App.css for styling the main application layout.
    - Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
    - Added a React SVG asset for branding.
    - Created index.css for global styles and theming.
    - Set up main.tsx as the entry point for the React application.
    - Added vite-env.d.ts for Vite type definitions.
    - Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
    - Created vite.config.ts for Vite configuration with React plugin.

    * fix: update license to Apache-2.0 and refactor import statements for consistency

    * feat(ui): initialize chatbot UI with React and Vite

    - Added package.json for UI package with scripts and dependencies.
    - Created App.css for styling the main application layout.
    - Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
    - Added a React SVG asset for branding.
    - Created index.css for global styles and theming.
    - Set up main.tsx as the entry point for the React application.
    - Added vite-env.d.ts for Vite type definitions.
    - Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
    - Created vite.config.ts for Vite configuration with React plugin.

    * fix: update license to Apache-2.0 and refactor import statements for consistency

    * feat(ingest): add initial configuration and data sources for chatbot ingestion

    * update configs

    * feat(ingest): implement data sources for LeafyGreen UI and MongoDB Chatbot Framework

    * chore: update pnpm workspace configuration to include 'apps/*' directory

    * feat(ingest): add data sources for LeafyGreen UI and MongoDB Chatbot Framework, and refactor Azure OpenAI embedder

    * feat(ingest): add MongoDB Design website data source and integrate into ingest configuration

    * Delete package-lock.json

    * reset ui

    * feat(crawler): export LoadedPageContents and ProcessSingleUrl interfaces

    * feat(crawler): refactor crawling logic to use processLangchainDocument and update allowedDomains format

    * feat(crawler): update recursive crawl logic to process documents with processLangchainDocument

    * feat(crawler): update package.json exports and refactor lodash imports

    * feat(crawler): implement createWebSourceConstructor and update ingest configuration

    * Update ingest.config.ts

    * feat(crawler): replace createWebSourceConstructor with webSourceConstructor and update data sources

    * fix(crawler): handle invalid URLs in newURL and recursive crawl logic

    * Resolve tsconfig.json

    ---------

    Co-authored-by: Terrence Keane <[email protected]>

* Delete webSourceConstructor.ts

* Squashed commit of the following:

commit 3eec08f
Author: Adam Thompson <[email protected]>
Date:   Fri May 9 10:46:31 2025 -0400

    Ingest with recursive crawler (#2849)

    * feat(ui): initialize chatbot UI with React and Vite (#2841)

    * feat(ui): initialize chatbot UI with React and Vite

    - Added package.json for UI package with scripts and dependencies.
    - Created App.css for styling the main application layout.
    - Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
    - Added a React SVG asset for branding.
    - Created index.css for global styles and theming.
    - Set up main.tsx as the entry point for the React application.
    - Added vite-env.d.ts for Vite type definitions.
    - Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
    - Created vite.config.ts for Vite configuration with React plugin.

    * fix: update license to Apache-2.0 and refactor import statements for consistency

    * feat(ui): initialize chatbot UI with React and Vite

    - Added package.json for UI package with scripts and dependencies.
    - Created App.css for styling the main application layout.
    - Implemented App.tsx as the main component integrating the MongoDB Chatbot UI.
    - Added a React SVG asset for branding.
    - Created index.css for global styles and theming.
    - Set up main.tsx as the entry point for the React application.
    - Added vite-env.d.ts for Vite type definitions.
    - Configured TypeScript with tsconfig.json and tsconfig.node.json for the UI package.
    - Created vite.config.ts for Vite configuration with React plugin.

    * fix: update license to Apache-2.0 and refactor import statements for consistency

    * feat(ingest): add initial configuration and data sources for chatbot ingestion

    * update configs

    * feat(ingest): implement data sources for LeafyGreen UI and MongoDB Chatbot Framework

    * chore: update pnpm workspace configuration to include 'apps/*' directory

    * feat(ingest): add data sources for LeafyGreen UI and MongoDB Chatbot Framework, and refactor Azure OpenAI embedder

    * feat(ingest): add MongoDB Design website data source and integrate into ingest configuration

    * Delete package-lock.json

    * reset ui

    * feat(crawler): export LoadedPageContents and ProcessSingleUrl interfaces

    * feat(crawler): refactor crawling logic to use processLangchainDocument and update allowedDomains format

    * feat(crawler): update recursive crawl logic to process documents with processLangchainDocument

    * feat(crawler): update package.json exports and refactor lodash imports

    * feat(crawler): implement createWebSourceConstructor and update ingest configuration

    * Update ingest.config.ts

    * feat(crawler): replace createWebSourceConstructor with webSourceConstructor and update data sources

    * fix(crawler): handle invalid URLs in newURL and recursive crawl logic

    * Resolve tsconfig.json

    ---------

    Co-authored-by: Terrence Keane <[email protected]>

---------

Co-authored-by: Terrence Keane <[email protected]>
…dder and client utilities; remove unused web source constructor. (#2851)
* Enhance Azure OpenAI integration: update environment variables, improve client initialization with connectivity validation, and refactor embedder usage.

* Refactor code structure for improved readability and maintainability

* Refactor Azure OpenAI client initialization: streamline connection testing by using a dedicated utility function and remove redundant code.

* Add test utility for Azure OpenAI client: implement connection testing with timeout handling and model type support

* Update ingest.config.ts

* lodash-es

* fix ts

* restore system prompt
…rations; refactor chatbot initialization to use Credal for LLM interactions.
Copy link

changeset-bot bot commented May 13, 2025

⚠️ No Changeset found

Latest commit: 32ddcd7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants