Skip to content

fix: add dependencies for pg vector store #312

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

Merged
merged 10 commits into from
Sep 24, 2024
Merged

Conversation

marcusschiesser
Copy link
Collaborator

@marcusschiesser marcusschiesser commented Sep 23, 2024

fixes #310

Summary by CodeRabbit

  • New Features

    • Introduced support for PGVectorStore, enhancing vector storage and retrieval capabilities.
    • Added a new configuration file to manage dependency error reporting for specific directories.
    • Updated functions to accept a new parameter for improved dependency management based on the vector database type.
    • Added a new test suite to validate TypeScript dependency resolution across various template frameworks and vector databases.
  • Refactor

    • Streamlined import statements for better organization in relevant components.
  • Bug Fixes

    • Enhanced error logging and handling in the dependency resolution process for better debugging.
    • Removed unnecessary properties from filters to improve query performance.

Copy link

changeset-bot bot commented Sep 23, 2024

🦋 Changeset detected

Latest commit: fe645fa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-llama Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link

coderabbitai bot commented Sep 23, 2024

Walkthrough

The pull request introduces a new configuration file, .coderabbit.yaml, which specifies rules for handling dependency errors in the templates directory. It also adds a patch for integrating PGVectorStore by including necessary dependencies. The installTSTemplate and updatePackageJson functions are updated to accept a new parameter, vectorDb, influencing dependency management. Additionally, import statements in several TypeScript files are consolidated to streamline the code.

Changes

Files Change Summary
.coderabbit.yaml New configuration file added with a reviews section specifying path_instructions for the templates directory.
.changeset/strong-wasps-nail.md Introduces a patch "create-llama" that adds dependencies for PGVectorStore.
helpers/typescript.ts Adds a new parameter vectorDb to installTSTemplate and updatePackageJson, modifying dependency management logic.
templates/components/vectordbs/typescript/pg/generate.ts Consolidates import statements for PGVectorStore, VectorStoreIndex, and storageContextFromDefaults.
templates/components/vectordbs/typescript/pg/index.ts Consolidates import statements for PGVectorStore and VectorStoreIndex from llamaindex.
e2e/resolve_ts_dependencies.spec.ts Introduces a new test suite for validating TypeScript dependency resolution across various frameworks and databases.

Assessment against linked issues

Objective Addressed Explanation
Cannot find module '.../node_modules/llamaindex/dist/cjs/storage/vectorStore/PGVectorStore.js' (Issue #310)
Resolve import issues related to PGVectorStore (Issue #310)

Possibly related PRs

  • feat: support uploading pdf, docx, txt #140: The main PR introduces a new configuration file that specifies handling for files in the templates directory, which may relate to the changes in the helpers/index.ts file that modifies directory creation logic, potentially impacting how templates are processed.
  • feat: use llamacloud for chat #149: This PR involves updates to the chat.ts file, which includes changes to the createChatEngine function that may interact with the new configuration rules established in the main PR regarding template handling.
  • feat: Add template for structured extraction #185: The addition of the structured extraction template may connect with the new configuration rules in the main PR, as both aim to improve data handling and processing within the templates directory.
  • refactor: make components resuable for chat llm #202: The refactor for reusable components in chat LLMs may relate to the new configuration rules in the main PR, as both aim to enhance modularity and functionality in template handling.
  • feat: use llamacloud pipeline in TS #236: The implementation of the LlamaCloud pipeline may connect with the new configuration rules in the main PR, as both involve improving data ingestion and processing workflows.

Suggested reviewers

  • thucpn

🐰 In the meadow, changes bloom,
.coderabbit.yaml clears the gloom.
With PGVectorStore now in sight,
Dependencies managed, all feels right!
Import paths streamlined, oh what a delight!
Hopping forward, we code with might! 🌼


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    -- I pushed a fix in commit <commit_id>, please review it.
    -- Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    -- @coderabbitai generate unit testing code for this file.
    -- @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    -- @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    -- @coderabbitai read src/utils.ts and generate unit testing code.
    -- @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    -- @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Outside diff range and nitpick comments (3)
.changeset/strong-wasps-nail.md (1)

1-5: LGTM! Consider expanding the description for better clarity.

The changeset file correctly indicates a patch update for "create-llama" to add dependencies for PGVectorStore, which aligns with the PR objectives. This is an appropriate way to document the change.

Consider expanding the description to provide more context. For example:

- Add dependencies for PGVectorStore
+ Add dependencies for PGVectorStore to resolve module not found errors
+ 
+ This patch adds the necessary dependencies to support PGVectorStore,
+ addressing the issue where the 'pg' package could not be found when
+ imported from PGVectorStore.js.

This additional information will be helpful for future reference and changelog generation.

templates/components/vectordbs/typescript/pg/index.ts (1)

Line range hint 4-19: LGTM! The rest of the file looks good.

The getDataSource function is well-structured and uses the imported PGVectorStore and VectorStoreIndex correctly. The use of environment variables and the checkRequiredEnvVars() function is a good practice for configuration and error prevention.

Consider adding a try-catch block in the getDataSource function to handle potential errors when creating the PGVectorStore or VectorStoreIndex. This would provide more graceful error handling and potentially more informative error messages. Here's a suggested implementation:

 export async function getDataSource(params?: any) {
   checkRequiredEnvVars();
-  const pgvs = new PGVectorStore({
-    connectionString: process.env.PG_CONNECTION_STRING,
-    schemaName: PGVECTOR_SCHEMA,
-    tableName: PGVECTOR_TABLE,
-  });
-  return await VectorStoreIndex.fromVectorStore(pgvs);
+  try {
+    const pgvs = new PGVectorStore({
+      connectionString: process.env.PG_CONNECTION_STRING,
+      schemaName: PGVECTOR_SCHEMA,
+      tableName: PGVECTOR_TABLE,
+    });
+    return await VectorStoreIndex.fromVectorStore(pgvs);
+  } catch (error) {
+    console.error("Error creating PGVectorStore or VectorStoreIndex:", error);
+    throw error;
+  }
 }

This change would provide more detailed error information if something goes wrong during the creation of the PGVectorStore or VectorStoreIndex.

templates/components/vectordbs/typescript/pg/generate.ts (1)

Line range hint 1-47: Overall, the file looks good with room for minor improvement.

The file is well-structured and includes proper error handling and environment variable checking. The changes made address the PR objectives by including the necessary import for PGVectorStore.

As a minor suggestion for improved clarity:

Consider adding a brief comment before the loadAndIndex function to explain its purpose and the overall flow of the embedding generation process. This would enhance code readability and maintainability.

Example:

// loadAndIndex: Loads documents, creates a PGVectorStore, and generates embeddings
// using LlamaIndex's VectorStoreIndex
async function loadAndIndex() {
  // ... existing code ...
}
Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between b31fa80 and f1d185a.

Files selected for processing (4)
  • .changeset/strong-wasps-nail.md (1 hunks)
  • helpers/typescript.ts (3 hunks)
  • templates/components/vectordbs/typescript/pg/generate.ts (1 hunks)
  • templates/components/vectordbs/typescript/pg/index.ts (1 hunks)
Additional comments not posted (5)
templates/components/vectordbs/typescript/pg/index.ts (1)

2-2: LGTM! Import statement consolidated.

The import statement has been updated to import both PGVectorStore and VectorStoreIndex directly from "llamaindex". This change aligns with the PR objectives and should help resolve the module not found errors mentioned in the linked issue.

Let's verify if all necessary dependencies are now properly included:

This script will help us confirm if all the necessary dependencies are now properly included and if there are any remaining module not found errors.

helpers/typescript.ts (4)

183-183: LGTM: Addition of vectorDb parameter aligns with PR objective.

The inclusion of the vectorDb parameter in the installTSTemplate function signature is a positive change. It directly addresses the PR's goal of handling dependencies for different vector databases, including PostgreSQL for PGVectorStore.


204-213: LGTM: Consistent addition of vectorDb parameter.

The addition of the vectorDb parameter to the updatePackageJson function signature and type definition is consistent with the changes made to installTSTemplate. This modification enables the function to handle vector database-specific package updates, which is in line with the PR's objectives.


Line range hint 1-310: Summary: Changes effectively address PR objectives.

The modifications in this file successfully address the PR objectives by:

  1. Adding the vectorDb parameter to relevant function signatures.
  2. Implementing logic to include the 'pg' dependency when PostgreSQL is selected as the vector database.

These changes should resolve the issue of missing dependencies for PGVectorStore and improve the project's flexibility in handling different vector database configurations.


260-265: LGTM: Addition of 'pg' dependency addresses PR objective.

The conditional block to add the 'pg' package when vectorDb is 'pg' directly addresses the issue mentioned in the PR objectives. This change should resolve the [ERR_MODULE_NOT_FOUND] error for the 'pg' package.

Consider adding a comment explaining why version '^8.12.0' was chosen for the 'pg' package.

Let's verify if this is the only place where the 'pg' dependency needs to be added:

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range and nitpick comments (3)
.coderabbit.yaml (3)

5-6: Consider clarifying the instruction comment.

While the current instruction is clear, it might be beneficial to make it more specific to the PR's objectives.

Consider updating the instruction comment to:

instructions: |
  For files under the `templates` folder, do not report 'Missing Dependencies Detected' errors, specifically for PGVectorStore and related modules.

This change would make the purpose of the instruction more explicit and directly tied to the issue being addressed.


1-6: Consider a more comprehensive solution.

While this configuration addresses the issue for the templates folder, the PR objectives mention that the problem also occurs in 'generate.ts', which might not be in this folder. Consider the following:

  1. Evaluate if this configuration needs to be applied to other directories as well.
  2. Investigate the possibility of properly including the required dependencies (like 'pg') in the project instead of just ignoring the errors.

Would you like assistance in identifying other potential locations where this configuration might be needed, or in properly including the missing dependencies?


1-6: Add an explanatory comment for future reference.

To improve maintainability, consider adding a comment at the beginning of the file explaining why this configuration is necessary.

You could add something like this at the beginning of the file:

# This configuration is needed to address issues with missing dependencies
# for PGVectorStore and related modules in template files.
# Related to issue #310 and PR #312.

This will help future maintainers understand the context and purpose of this configuration.

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between f1d185a and 809f88a.

Files selected for processing (1)
  • .coderabbit.yaml (1 hunks)
Additional comments not posted (1)
.coderabbit.yaml (1)

1-6: LGTM! Configuration aligns with PR objectives.

The .coderabbit.yaml file is correctly structured and addresses the issue of missing dependencies for the PGVectorStore module. By instructing CodeRabbit to ignore 'Missing Dependencies Detected' errors in the templates folder, it provides a solution to the problem described in the linked issue #310.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 809f88a and 418b180.

Files selected for processing (1)
  • e2e/resolve_ts_dependencies.spec.ts (1 hunks)

Comment on lines 67 to 68
// Check if there's any error output
expect(stderr).toBeFalsy();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Issue

Check stdout for TypeScript errors instead of stderr

The TypeScript compiler outputs compilation errors to stdout, not stderr. Therefore, checking stderr may not detect compilation errors. Instead, you should inspect stdout for error messages or check the process exit code.

Apply this diff to adjust the assertion:

-// Check if there's any error output
-expect(stderr).toBeFalsy();
+// Ensure that there are no compilation errors
+expect(stdout).not.toMatch(/error TS\d{4}:/);
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
// Check if there's any error output
expect(stderr).toBeFalsy();
// Ensure that there are no compilation errors
expect(stdout).not.toMatch(/error TS\d{4}:/);

Comment on lines 60 to 65
const { stdout, stderr } = await execAsync(
"pnpm exec tsc -b --diagnostics",
{
cwd: appDir,
},
);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Issue

Handle execAsync rejections to properly catch TypeScript compilation errors

Currently, if the TypeScript compilation fails due to errors, execAsync will reject the promise and throw an exception. This can cause the test to fail unexpectedly without providing clear feedback on the compilation errors.

Consider wrapping the execAsync call in a try...catch block to handle exceptions and provide informative error messages or assertions.

Apply this diff to handle the error appropriately:

+try {
  const { stdout, stderr } = await execAsync(
    "pnpm exec tsc -b --diagnostics",
    {
      cwd: appDir,
    },
  );
+  // Ensure that there are no compilation errors
+  expect(stdout).not.toMatch(/error TS\d{4}:/);
+} catch (error) {
+  // Handle the error thrown by execAsync
+  console.error('TypeScript compilation failed:', error);
+  throw error; // Re-throw the error to fail the test
+}
Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const { stdout, stderr } = await execAsync(
"pnpm exec tsc -b --diagnostics",
{
cwd: appDir,
},
);
try {
const { stdout, stderr } = await execAsync(
"pnpm exec tsc -b --diagnostics",
{
cwd: appDir,
},
);
// Ensure that there are no compilation errors
expect(stdout).not.toMatch(/error TS\d{4}:/);
} catch (error) {
// Handle the error thrown by execAsync
console.error('TypeScript compilation failed:', error);
throw error; // Re-throw the error to fail the test
}

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Outside diff range and nitpick comments (2)
e2e/utils.ts (2)

112-112: Enhanced error message with exit code

Excellent improvement. Including the specific exit code in the error message will greatly aid in debugging and troubleshooting failed create-llama command executions.

Consider wrapping the exit code in backticks for better readability:

-      throw new Error(`create-llama command failed with exit code ${code}`);
+      throw new Error(`create-llama command failed with exit code \`${code}\``);

124-125: Added handling for dependencies post-install action

This change effectively addresses the issue described in the PR objectives by adding a specific handling for the "dependencies" post-install action. The one-minute timeout for dependency resolution seems reasonable.

For consistency with the other conditions, consider extracting the timeout value to a constant:

+  const DEPENDENCY_RESOLUTION_TIMEOUT = 1000 * 60; // 1 minute
+  const CREATE_LLAMA_EXIT_TIMEOUT = 1000 * 10; // 10 seconds

   if (postInstallAction === "runApp") {
     await checkAppHasStarted(
       appType === "--frontend",
       templateFramework,
       port,
       externalPort,
     );
   } else if (postInstallAction === "dependencies") {
-    await waitForProcess(appProcess, 1000 * 60); // wait 1 min for dependencies to be resolved
+    await waitForProcess(appProcess, DEPENDENCY_RESOLUTION_TIMEOUT); // wait for dependencies to be resolved
   } else {
     // wait 10 seconds for create-llama to exit
-    await waitForProcess(appProcess, 1000 * 10);
+    await waitForProcess(appProcess, CREATE_LLAMA_EXIT_TIMEOUT);
   }

This change improves readability and makes it easier to adjust these timeouts in the future if needed.

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 418b180 and 5146713.

Files selected for processing (5)
  • e2e/resolve_ts_dependencies.spec.ts (1 hunks)
  • e2e/utils.ts (2 hunks)
  • helpers/typescript.ts (3 hunks)
  • templates/components/vectordbs/typescript/qdrant/generate.ts (1 hunks)
  • templates/components/vectordbs/typescript/qdrant/index.ts (1 hunks)
Files skipped from review due to trivial changes (1)
  • templates/components/vectordbs/typescript/qdrant/index.ts
Files skipped from review as they are similar to previous changes (2)
  • e2e/resolve_ts_dependencies.spec.ts
  • helpers/typescript.ts
Additional context used
Path-based instructions (1)
templates/components/vectordbs/typescript/qdrant/generate.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

Additional comments not posted (3)
templates/components/vectordbs/typescript/qdrant/generate.ts (1)

4-4: LGTM! Verify the updated import path.

The import path for QdrantVectorStore has been correctly updated to reflect the new structure in the llamaindex library. This change aligns with the PR objectives of addressing dependency issues.

To ensure this change is consistent across the project, please run the following script:

Verification successful

Import path for QdrantVectorStore correctly updated with no remaining old paths.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining old import paths for QdrantVectorStore

# Test: Search for old import paths. Expect: No results.
rg --type typescript 'from "llamaindex/storage/vectorStore/QdrantVectorStore"'

# Test: Confirm new import path is used consistently. Expect: Consistent usage across files.
rg --type typescript 'from "llamaindex/vector-store/QdrantVectorStore"'

Length of output: 224


Script:

#!/bin/bash
# Description: Check for any remaining old import paths for QdrantVectorStore without using --type

# Test: Search for old import paths. Expect: No results.
rg -g "*.ts" -g "*.tsx" 'from "llamaindex/storage/vectorStore/QdrantVectorStore"'

# Test: Confirm new import path is used consistently. Expect: Consistent usage across files.
rg -g "*.ts" -g "*.tsx" 'from "llamaindex/vector-store/QdrantVectorStore"'

Length of output: 437

e2e/utils.ts (2)

108-108: Improved error logging

Good change. Using console.error instead of console.log for stderr data is more appropriate and aligns with best practices for error handling. This will improve the visibility of error messages during the execution of the create-llama command.


Line range hint 1-194: Summary of changes

The modifications in this file effectively address the PR objectives:

  1. Improved error logging by using console.error for stderr data.
  2. Enhanced error messages with specific exit codes for better debugging.
  3. Added handling for the "dependencies" post-install action to resolve the issue with missing dependencies for PGVectorStore.

These changes improve the overall robustness and debuggability of the create-llama command execution process. The code is well-structured and consistent with the existing style.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

Outside diff range and nitpick comments (3)
templates/components/vectordbs/typescript/astra/generate.ts (1)

Line range hint 18-23: LGTM! Consider enhancing error handling.

The change from create to createAndConnect is a good improvement, combining two operations into one. This aligns well with the PR objectives.

Consider enhancing the error handling for this operation. For example:

try {
  await vectorStore.createAndConnect(collectionName, {
    vector: {
      dimension: parseInt(process.env.EMBEDDING_DIM!),
      metric: "cosine",
    },
  });
  console.log(`Successfully created and connected to collection: ${collectionName}`);
} catch (error) {
  console.error(`Failed to create and connect to collection: ${collectionName}`, error);
  // Consider adding appropriate error handling or rethrowing the error
}

This will provide better visibility into the success or failure of the operation and allow for more robust error handling if needed.

helpers/typescript.ts (2)

Line range hint 13-29: LGTM! Consider adding JSDoc for the new parameter.

The addition of the vectorDb parameter to the installTSTemplate function aligns well with the PR objectives. It allows for flexible configuration of different vector databases.

Consider adding JSDoc for the new vectorDb parameter to improve code documentation:

/**
 * Install a LlamaIndex internal template to a given `root` directory.
 * @param {Object} args - The arguments for installing the template
 * @param {string} args.vectorDb - The vector database to be used (e.g., 'pg', 'qdrant', 'mongo', 'milvus')
 */

260-285: LGTM! Consider adding error handling for unknown vector databases.

The addition of vector database-specific dependencies based on the vectorDb value directly addresses the PR objectives. This implementation ensures that the necessary packages are included for each supported vector database.

Consider adding a default case to handle unknown vectorDb values. This could help prevent silent failures and improve debugging. For example:

if (vectorDb === "pg") {
  // ... existing code ...
} else if (vectorDb === "qdrant") {
  // ... existing code ...
} else if (vectorDb === "mongo") {
  // ... existing code ...
} else if (vectorDb === "milvus") {
  // ... existing code ...
} else if (vectorDb && vectorDb !== "llamacloud") {
  console.warn(`Unknown vector database: ${vectorDb}. No additional dependencies added.`);
}

This change would log a warning for any unknown vector database, excluding the 'llamacloud' option which doesn't require additional dependencies.

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 5146713 and 8690ba2.

Files selected for processing (14)
  • e2e/resolve_ts_dependencies.spec.ts (1 hunks)
  • helpers/typescript.ts (3 hunks)
  • templates/components/vectordbs/typescript/astra/generate.ts (2 hunks)
  • templates/components/vectordbs/typescript/astra/index.ts (1 hunks)
  • templates/components/vectordbs/typescript/chroma/generate.ts (2 hunks)
  • templates/components/vectordbs/typescript/chroma/index.ts (1 hunks)
  • templates/components/vectordbs/typescript/llamacloud/queryFilter.ts (0 hunks)
  • templates/components/vectordbs/typescript/milvus/generate.ts (1 hunks)
  • templates/components/vectordbs/typescript/milvus/index.ts (1 hunks)
  • templates/components/vectordbs/typescript/mongo/generate.ts (1 hunks)
  • templates/components/vectordbs/typescript/mongo/index.ts (1 hunks)
  • templates/components/vectordbs/typescript/pinecone/generate.ts (1 hunks)
  • templates/components/vectordbs/typescript/pinecone/index.ts (1 hunks)
  • templates/components/vectordbs/typescript/weaviate/index.ts (1 hunks)
Files not reviewed due to no reviewable changes (1)
  • templates/components/vectordbs/typescript/llamacloud/queryFilter.ts
Files skipped from review due to trivial changes (1)
  • templates/components/vectordbs/typescript/weaviate/index.ts
Files skipped from review as they are similar to previous changes (1)
  • e2e/resolve_ts_dependencies.spec.ts
Additional context used
Path-based instructions (10)
templates/components/vectordbs/typescript/astra/generate.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

templates/components/vectordbs/typescript/astra/index.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

templates/components/vectordbs/typescript/chroma/generate.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

templates/components/vectordbs/typescript/chroma/index.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

templates/components/vectordbs/typescript/milvus/generate.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

templates/components/vectordbs/typescript/milvus/index.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

templates/components/vectordbs/typescript/mongo/generate.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

templates/components/vectordbs/typescript/mongo/index.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

templates/components/vectordbs/typescript/pinecone/generate.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

templates/components/vectordbs/typescript/pinecone/index.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

Additional comments not posted (11)
templates/components/vectordbs/typescript/pinecone/index.ts (1)

3-3: LGTM! Import path updated correctly.

The import path for PineconeVectorStore has been updated to reflect the new structure in the llamaindex library. This change is correct and should resolve any import issues related to this specific vector store.

However, I noticed that the PR objectives mention issues with PGVectorStore and missing dependencies, while this file deals with PineconeVectorStore. Could you clarify if there are other files that need to be updated for PGVectorStore, or if this change indirectly addresses the reported issue?

Let's verify if this change is consistent across the codebase:

templates/components/vectordbs/typescript/milvus/index.ts (1)

2-2: LGTM! Import path updated correctly.

The change in the import path for MilvusVectorStore from "llamaindex/storage/vectorStore/MilvusVectorStore" to "llamaindex/vector-store/MilvusVectorStore" is consistent with a package restructuring. This update improves organization by placing vector stores in a dedicated "vector-store" directory.

To ensure consistency across the project, let's check if similar changes are needed for other vector stores:

Verification successful

Verified: No other vector store import paths need updating.

All other vector store imports are correctly updated in the codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for other vector store imports that might need updating

# Search for other vector store imports
rg --type typescript 'from "llamaindex/storage/vectorStore/' -g '!**/milvus/**'

Length of output: 116


Script:

#!/bin/bash
# Description: Check for other vector store imports that might need updating

# Search for other vector store imports in TypeScript files
rg 'from "llamaindex/storage/vectorStore/' --glob '*.ts' -g '!**/milvus/**'

Length of output: 77

templates/components/vectordbs/typescript/astra/index.ts (1)

3-3: LGTM! Import path updated correctly.

The import path for AstraDBVectorStore has been updated to reflect the new structure in the llamaindex library. This change is correct and should resolve any import issues related to this specific vector store.

However, I noticed that the PR objectives mention addressing issues with PGVectorStore, while this file deals with AstraDBVectorStore. Could you clarify if there are additional changes related to PGVectorStore that should be included in this PR?

Let's verify if this change is consistent across the codebase:

Verification successful

Verified! Import paths are consistently updated.

The import path for AstraDBVectorStore has been correctly updated in both index.ts and generate.ts. No instances of the old import path remain in the codebase, ensuring consistency and resolving any related import issues.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any remaining occurrences of the old import path and find other usages of AstraDBVectorStore

echo "Checking for old import path:"
rg --type typescript "llamaindex/storage/vectorStore/AstraDBVectorStore"

echo "Checking for other usages of AstraDBVectorStore:"
rg --type typescript "AstraDBVectorStore"

Length of output: 360


Script:

#!/bin/bash
# Description: Check for any remaining occurrences of the old import path and find other usages of AstraDBVectorStore in TypeScript files

echo "Checking for old import path in .ts and .tsx files:"
rg "llamaindex/storage/vectorStore/AstraDBVectorStore" --type-add 'ts=**/*.ts' --type-add 'tsx=**/*.tsx' -t ts -t tsx

echo "Checking for other usages of AstraDBVectorStore in .ts and .tsx files:"
rg "AstraDBVectorStore" --type-add 'ts=**/*.ts' --type-add 'tsx=**/*.tsx' -t ts -t tsx

Length of output: 588


Script:

#!/bin/bash
# Description: Check for any remaining occurrences of the old import path and find other usages of AstraDBVectorStore in TypeScript files

echo "Checking for old import path in .ts and .tsx files:"
rg "llamaindex/storage/vectorStore/AstraDBVectorStore" --type-add 'ts:*.ts' --type-add 'tsx:*.tsx' -t ts -t tsx

echo "Checking for other usages of AstraDBVectorStore in .ts and .tsx files:"
rg "AstraDBVectorStore" --type-add 'ts:*.ts' --type-add 'tsx:*.tsx' -t ts -t tsx

Length of output: 942

templates/components/vectordbs/typescript/chroma/index.ts (1)

3-3: Approve import path update and verify library structure.

The import path for ChromaVectorStore has been updated, which aligns with the PR objective of fixing dependencies. This change suggests a restructuring of the llamaindex library, potentially improving organization.

To ensure the new import path is correct across the project, run the following script:

Verification successful

Import path updates for ChromaVectorStore verified.

The new import path "llamaindex/vector-store/ChromaVectorStore" is correctly used in the following files:

  • templates/components/vectordbs/typescript/chroma/index.ts
  • templates/components/vectordbs/typescript/chroma/generate.ts

No old import paths were found, confirming that the update is complete.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the import path for ChromaVectorStore

# Test: Search for ChromaVectorStore imports
rg --type typescript 'from\s+"llamaindex/vector-store/ChromaVectorStore"'

# Test: Check if there are any remaining old import paths
rg --type typescript 'from\s+"llamaindex/storage/vectorStore/ChromaVectorStore"'

Length of output: 228


Script:

#!/bin/bash
# Description: Verify the import path for ChromaVectorStore with corrected file type

# Test: Search for ChromaVectorStore imports with the correct TypeScript file type
rg --type ts 'from\s+"llamaindex/vector-store/ChromaVectorStore"'

# Test: Check if there are any remaining old import paths with the correct file type
rg --type ts 'from\s+"llamaindex/storage/vectorStore/ChromaVectorStore"'

Length of output: 419

templates/components/vectordbs/typescript/mongo/index.ts (1)

3-3: LGTM! Verify the new import path.

The updated import path for MongoDBAtlasVectorSearch looks good and aligns with the PR objectives. This change likely reflects a reorganization in the llamaindex library structure, moving towards a more streamlined module hierarchy.

To ensure the new import path is correct and consistent across the project, please run the following verification script:

This script will help ensure that the import path has been updated consistently across the project and that no old import paths remain.

Verification successful

Import path update verified.

All instances of the old import path have been successfully removed, and the new import path is used consistently across the project.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the import path for MongoDBAtlasVectorSearch across the project

# Test: Search for any remaining old import paths
echo "Checking for any remaining old import paths:"
rg --type typescript "llamaindex/storage/vectorStore/MongoDBAtlasVectorStore"

# Test: Verify the new import path is used consistently
echo "Verifying the new import path usage:"
rg --type typescript "llamaindex/vector-store/MongoDBAtlasVectorStore"

Length of output: 400


Script:

#!/bin/bash
# Description: Verify the import path for MongoDBAtlasVectorSearch across the project without specifying the file type

# Test: Search for any remaining old import paths
echo "Checking for any remaining old import paths:"
rg "llamaindex/storage/vectorStore/MongoDBAtlasVectorStore" --glob "*.ts" --glob "*.tsx"

# Test: Verify the new import path usage
echo "Verifying the new import path usage:"
rg "llamaindex/vector-store/MongoDBAtlasVectorStore" --glob "*.ts" --glob "*.tsx"

Length of output: 653

templates/components/vectordbs/typescript/pinecone/generate.ts (1)

4-4: LGTM! Verify the new import path.

The updated import path for PineconeVectorStore looks good and aligns with the PR objectives. This change should help resolve the dependency issues mentioned in the linked issue #310.

To ensure the new import path is correct and consistent across the project, please run the following verification script:

This script will help ensure that the import path change is consistent across the project and identify any remaining instances of the old import path or unexpected variations.

Verification successful

The initial verification script failed to recognize TypeScript file types. Here's an updated script to properly verify the import paths:

This revised script targets .ts and .tsx files directly, bypassing the need for rg to recognize the typescript file type. Please execute this script to continue the verification process.


Import path verification successful.

All instances of PineconeVectorStore have been updated to llamaindex/vector-store/PineconeVectorStore across the project, with no remnants of the old import path remaining.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the import path for PineconeVectorStore across the project

# Test 1: Check if the new import path exists
if ! rg --type typescript "from\s+['\"]llamaindex/vector-store/PineconeVectorStore['\"]" > /dev/null; then
    echo "Warning: The new import path 'llamaindex/vector-store/PineconeVectorStore' was not found in any TypeScript files."
fi

# Test 2: Check for any remaining occurrences of the old import path
if rg --type typescript "from\s+['\"]llamaindex/storage/vectorStore/PineconeVectorStore['\"]" > /dev/null; then
    echo "Warning: Found occurrences of the old import path 'llamaindex/storage/vectorStore/PineconeVectorStore'. These should be updated."
fi

# Test 3: Check for any other import paths for PineconeVectorStore
rg --type typescript "from\s+['\"]llamaindex/.*PineconeVectorStore['\"]" | grep -v "vector-store/PineconeVectorStore"

echo "Verification complete. Please review any warnings or unexpected import paths found."

Length of output: 833


Script:

#!/bin/bash
# Description: Verify the import path for PineconeVectorStore across the project

# Test 1: Check if the new import path exists in .ts and .tsx files
if ! rg "from\s+['\"]llamaindex/vector-store/PineconeVectorStore['\"]" --glob "*.ts" --glob "*.tsx" > /dev/null; then
    echo "Warning: The new import path 'llamaindex/vector-store/PineconeVectorStore' was not found in any TypeScript files."
fi

# Test 2: Check for any remaining occurrences of the old import path in .ts and .tsx files
if rg "from\s+['\"]llamaindex/storage/vectorStore/PineconeVectorStore['\"]" --glob "*.ts" --glob "*.tsx" > /dev/null; then
    echo "Warning: Found occurrences of the old import path 'llamaindex/storage/vectorStore/PineconeVectorStore'. These should be updated."
fi

# Test 3: Check for any other import paths for PineconeVectorStore in .ts and .tsx files
rg "from\s+['\"]llamaindex/.*PineconeVectorStore['\"]" --glob "*.ts" --glob "*.tsx" | grep -v "vector-store/PineconeVectorStore"

echo "Verification complete. Please review any warnings or unexpected import paths found."

Length of output: 518

templates/components/vectordbs/typescript/milvus/generate.ts (1)

4-4: LGTM! Verify the new import path.

The import statement for MilvusVectorStore has been updated to reflect the new package structure. This change is consistent with the restructuring of the llamaindex package.

To ensure the new import path is correct and the MilvusVectorStore class is available, please run the following verification script:

This script will help confirm that the new import path is being used consistently and that there are no remaining instances of the old import path.

Verification successful

[/run_scripts]


Import path successfully updated.

The new import path for MilvusVectorStore is correctly used in generate.ts, and no instances of the old import path remain in the codebase.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the existence of MilvusVectorStore in the new import path

# Test: Check if the new import path exists
if rg --type typescript "from ['\"]llamaindex/vector-store/MilvusVectorStore['\"]" templates/components/vectordbs/typescript/milvus/generate.ts > /dev/null; then
  echo "New import path found in generate.ts"
else
  echo "New import path not found in generate.ts"
fi

# Test: Search for any remaining old import paths
rg --type typescript "from ['\"]llamaindex/storage/vectorStore/MilvusVectorStore['\"]"

Length of output: 400


Script:

#!/bin/bash
# Description: Verify the existence of MilvusVectorStore in the new import path without relying on '--type' flag

# Find all TypeScript files and check for the new import path
find . -type f -name "*.ts" | xargs grep -H "from ['\"]llamaindex/vector-store/MilvusVectorStore['\"]" > /dev/null
if [ $? -eq 0 ]; then
  echo "New import path found in generate.ts"
else
  echo "New import path not found in generate.ts"
fi

# Search for any remaining old import paths in all TypeScript files
if find . -type f -name "*.ts" | xargs grep -H "from ['\"]llamaindex/storage/vectorStore/MilvusVectorStore['\"]" > /dev/null; then
  echo "Old import path still exists in the codebase."
else
  echo "No instances of the old import path found."
fi

Length of output: 420

templates/components/vectordbs/typescript/astra/generate.ts (2)

Line range hint 1-42: Overall, the changes look good and align with the PR objectives.

The modifications to the import path and the vector store creation method address the issues mentioned in the PR objectives. The code quality is good, with only minor suggestions for improvement in error handling.

Remember to update any documentation or README files to reflect these changes, especially regarding the new import path and the createAndConnect method.


4-4: LGTM! Verify consistency of import path across the codebase.

The updated import path for AstraDBVectorStore aligns with the PR objectives and reflects the restructuring of the module's directory.

To ensure consistency, let's verify the usage of this import path across the codebase:

Verification successful

Import path for AstraDBVectorStore is consistent across the codebase.

The updated import path has been verified in the following files:

  • templates/components/vectordbs/typescript/astra/index.ts
  • templates/components/vectordbs/typescript/astra/generate.ts
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the consistency of AstraDBVectorStore import path

# Test: Search for AstraDBVectorStore imports
rg --type typescript "import.*AstraDBVectorStore"

Length of output: 86


Script:

#!/bin/bash
# Description: Verify the consistency of AstraDBVectorStore import path

# Test: Search for AstraDBVectorStore imports with corrected file type
rg --type ts "import.*AstraDBVectorStore"

Length of output: 322

helpers/typescript.ts (2)

204-213: LGTM! Consistent with previous changes.

The addition of the vectorDb parameter to the updatePackageJson function's type definition is consistent with the changes made to the installTSTemplate function. This modification allows for vector database-specific package updates, which aligns with the PR objectives.


Line range hint 1-324: Overall, the changes effectively address the PR objectives.

The modifications to helpers/typescript.ts successfully implement the addition of vector database dependencies, addressing the issue described in #310. The changes are well-structured and allow for easy expansion to support additional vector databases in the future.

Key points:

  1. The vectorDb parameter has been consistently added to relevant functions.
  2. Vector database-specific dependencies are correctly added based on the vectorDb value.
  3. The implementation is flexible and maintainable.

Minor suggestions for improvement have been made in the previous comments, including adding JSDoc for the new parameter and implementing error handling for unknown vector databases.

import { checkRequiredEnvVars } from "./shared";

export async function getDataSource(params?: any) {
checkRequiredEnvVars();
const chromaUri = `http://${process.env.CHROMA_HOST}:${process.env.CHROMA_PORT}`;

const store = new ChromaVectorStore({
collectionName: process.env.CHROMA_COLLECTION,
collectionName: process.env.CHROMA_COLLECTION!,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider a more robust approach for handling environment variables.

While the non-null assertion operator (!) resolves TypeScript errors, it might lead to runtime errors if the CHROMA_COLLECTION environment variable is not set. Although checkRequiredEnvVars() is called earlier, which might validate the presence of required environment variables, it's generally safer to handle potential undefined values explicitly.

Consider using a default value or throwing a more descriptive error:

collectionName: process.env.CHROMA_COLLECTION ?? throw new Error("CHROMA_COLLECTION environment variable is not set"),

This approach ensures type safety and provides a clear error message if the environment variable is missing.

@@ -1,7 +1,7 @@
/* eslint-disable turbo/no-undeclared-env-vars */
import * as dotenv from "dotenv";
import { VectorStoreIndex, storageContextFromDefaults } from "llamaindex";
import { ChromaVectorStore } from "llamaindex/storage/vectorStore/ChromaVectorStore";
import { ChromaVectorStore } from "llamaindex/vector-store/ChromaVectorStore";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Missing Dependency: llamaindex is not listed in package.json.

The ChromaVectorStore is being imported from the llamaindex package in multiple TypeScript files, but llamaindex is not listed under dependencies, devDependencies, or peerDependencies in package.json.

  • Action Required: Add llamaindex to the appropriate dependency section in package.json to ensure it is correctly installed and available during runtime.
Analysis chain

Verify the updated import path for ChromaVectorStore.

The import path for ChromaVectorStore has been updated. This change likely reflects a reorganization in the llamaindex library structure.

To ensure this change is correct and consistent, please run the following script:

This will help confirm that:

  1. The import path is consistent across the project.
  2. The llamaindex package version is up-to-date and supports this new import path.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the import path for ChromaVectorStore across the project

# Test: Search for ChromaVectorStore imports
rg --type typescript "import.*ChromaVectorStore.*from.*llamaindex"

# Test: Check if the llamaindex package is up-to-date
if [ -f "package.json" ]; then
  jq '.dependencies.llamaindex' package.json
fi

Length of output: 177


Script:

#!/bin/bash
# Description: Verify the import path for ChromaVectorStore across the project and check all dependency sections for llamaindex

# Test: Search for ChromaVectorStore imports using wildcard pattern
rg "import.*ChromaVectorStore.*from.*llamaindex" --glob "*.ts"

# Test: Check if the llamaindex package is listed in dependencies, devDependencies, or peerDependencies
if [ -f "package.json" ]; then
  echo "Dependencies:"
  jq '.dependencies.llamaindex' package.json
  echo "DevDependencies:"
  jq '.devDependencies.llamaindex' package.json
  echo "PeerDependencies:"
  jq '.peerDependencies.llamaindex' package.json
fi

Length of output: 637

@@ -1,7 +1,7 @@
/* eslint-disable turbo/no-undeclared-env-vars */
import * as dotenv from "dotenv";
import { storageContextFromDefaults, VectorStoreIndex } from "llamaindex";
import { MongoDBAtlasVectorSearch } from "llamaindex/storage/vectorStore/MongoDBAtlasVectorStore";
import { MongoDBAtlasVectorSearch } from "llamaindex/vector-store/MongoDBAtlasVectorStore";
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codebase verification

Import path points to a non-existent directory.

The new import path llamaindex/vector-store/MongoDBAtlasVectorStore does not exist. The directory llamaindex/vector-store was not found, which may cause import errors.

Analysis chain

LGTM! Verify the new import path.

The change to the import path for MongoDBAtlasVectorSearch looks good. This update likely reflects a restructuring in the llamaindex library, moving the MongoDBAtlasVectorStore from storage/vectorStore to vector-store.

To ensure this change is correct and functional, please run the following verification steps:

  1. Ensure the llamaindex package is up-to-date.
  2. Verify that the code compiles without any import-related errors.
  3. If possible, run a quick test to confirm that the MongoDBAtlasVectorSearch functionality still works as expected with this new import path.

This script will check if llamaindex is installed and attempt to compile the TypeScript file to catch any potential import errors.

Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the new import path for MongoDBAtlasVectorSearch

# Test: Check if the new import path exists in the llamaindex package
npm list llamaindex | grep -q "llamaindex" && echo "llamaindex is installed" || echo "llamaindex is not installed"

# Note: The following command assumes TypeScript is set up in the project
# If TypeScript is not set up, you may need to adjust the command accordingly
npx tsc --noEmit templates/components/vectordbs/typescript/mongo/generate.ts

Length of output: 328


Script:

#!/bin/bash
# Description: Verify the new import path for MongoDBAtlasVectorSearch using fd and ast-grep

# Check if MongoDBAtlasVectorStore exists in the new path
fd "MongoDBAtlasVectorStore" ./llamaindex/vector-store --type f

# Verify the import statement in generate.ts
ast-grep --lang typescript --pattern $'import { MongoDBAtlasVectorSearch } from "llamaindex/vector-store/MongoDBAtlasVectorStore";' templates/components/vectordbs/typescript/mongo/generate.ts

Length of output: 523

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 6351281 and 87e4cf2.

Files selected for processing (1)
  • templates/types/streaming/express/src/controllers/chat-request.controller.ts (1 hunks)
Additional context used
Path-based instructions (1)
templates/types/streaming/express/src/controllers/chat-request.controller.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

@@ -35,7 +35,7 @@ export const chatRequest = async (req: Request, res: Response) => {
// Convert message content from Vercel/AI format to LlamaIndex/OpenAI format
// Note: The non-streaming template does not need the Vercel/AI format, we're still using it for consistency with the streaming template
const userMessageContent = convertMessageContent(
userMessage.content,
userMessage.content as string,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Refactor suggestion

Consider removing the type assertion or adding a type guard.

The added type assertion as string for userMessage.content might be unnecessary and could potentially mask type-related issues. Consider the following alternatives:

  1. If ChatMessage type already defines content as a string, remove the assertion:

    userMessage.content,
  2. If there's uncertainty about the type, add a type guard instead:

    typeof userMessage.content === 'string' ? userMessage.content : String(userMessage.content),

This approach maintains type safety while handling potential edge cases.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 87e4cf2 and fe645fa.

Files selected for processing (3)
  • templates/components/engines/typescript/agent/chat.ts (2 hunks)
  • templates/components/vectordbs/typescript/pg/generate.ts (1 hunks)
  • templates/components/vectordbs/typescript/pg/index.ts (1 hunks)
Files skipped from review as they are similar to previous changes (2)
  • templates/components/vectordbs/typescript/pg/generate.ts
  • templates/components/vectordbs/typescript/pg/index.ts
Additional context used
Path-based instructions (1)
templates/components/engines/typescript/agent/chat.ts (1)

Pattern templates/**: For files under the templates folder, do not report 'Missing Dependencies Detected' errors.

Additional comments not posted (1)
templates/components/engines/typescript/agent/chat.ts (1)

1-6: LGTM: Import statement updated correctly.

The addition of ChatEngine to the import statement from llamaindex is consistent with the changes in the function return type.

@marcusschiesser marcusschiesser merged commit 0213fe0 into main Sep 24, 2024
37 checks passed
@marcusschiesser marcusschiesser deleted the ms/fix-postgres branch September 24, 2024 09:11
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.

Cannot find module '.../node_modules/llamaindex/dist/cjs/storage/vectorStore/PGVectorStore.js'
1 participant