• Find imports from deprecated pre 0.1 LangChain modules and update them to import from the new LangChain packages.

    Parameters

    • __namedParameters: {
          codePath: string;
          localLangChainPath: string;
          customGlobPattern?: string;
          customIgnorePattern?: string | string[];
          skipCheck?: UpgradingModule[];
      }
      • codePath: string

        The absolute path to the source directory of the codebase to update.

        Example

        "/Users/username/code/my-project/src"
        
      • localLangChainPath: string

        The absolute path to the locally cloned LangChain repo root.

        Example

        "/Users/username/code/langchainjs"
        
      • Optional customGlobPattern?: string

        Optionally, pass in a custom glob pattern to match files. The backslash included in the example and default is only for JSDoc to escape the asterisk. Do not include unless intentionally.

        Example

        "/*.d.ts"
        

        Default

        "**/*.ts"
        
      • Optional customIgnorePattern?: string | string[]

        A custom ignore pattern for ignoring files. The backslash included in the example and default is only for JSDoc to escape the asterisk. Do not include unless intentionally.

        Example

        ["**/node_modules/**", "**/dist/**", "**/*.d.ts"]
        

        Default

        node_modules/**
        
      • Optional skipCheck?: UpgradingModule[]

        Optionally skip checking the passed modules for imports to update.

        Example

        [UpgradingModule.COHERE]
        

        Default

        undefined
        

    Returns Promise<void>

Generated using TypeDoc