Skip to content
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

scripts[minor]: Add CLI for document loader integration docs #6303

Merged
merged 7 commits into from
Aug 1, 2024
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
drop mdx file
bracesproul committed Aug 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 50bdfee28333b49862312e99153401a3b42bf07e

This file was deleted.


Unchanged files with check annotations Beta

/**
* Install a internal template to a given `root` directory.
*/
export async function installTemplate({ appName, root }: any) {

Check warning on line 10 in libs/create-langchain-integration/helpers/templates.ts

GitHub Actions / Check linting

Unexpected any. Specify a different type
/**
* Copy the template files to the target directory.
*/
* Update the package.json scripts.
*/
const packageJsonFile = path.join(root, "package.json");
const packageJson: any = JSON.parse(

Check warning on line 28 in libs/create-langchain-integration/helpers/templates.ts

GitHub Actions / Check linting

Unexpected any. Specify a different type
await fs.readFile(packageJsonFile, "utf8")
);
greenText,
redBackground,
} from "../utils/get-input.js";
import _ from "lodash";

Check failure on line 9 in libs/langchain-scripts/src/cli/docs/document_loaders.ts

GitHub Actions / Check linting

`lodash` import should occur before import of `../utils/get-input.js`
const NODE_OR_WEB_PLACEHOLDER = "__fs_or_web__";
const PACKAGE_NAME_PLACEHOLDER = "__package_name__";
const packageNameShortSnakeCase = fields.packageName.replaceAll("-", "_");
const fullPackageNameSnakeCase = `langchain_community_document_loaders_${extraFields?.webSupport ? "web" : "fs"}_${packageNameShortSnakeCase}`;
let fullPackageImportPath = `@langchain/community/document_loaders/${extraFields?.webSupport ? "web" : "fs"}/${fields.packageName}`

Check failure on line 121 in libs/langchain-scripts/src/cli/docs/document_loaders.ts

GitHub Actions / Check linting

'fullPackageImportPath' is never reassigned. Use 'const' instead
let moduleNameAllCaps = _.snakeCase(fields.moduleName).toUpperCase();
if (moduleNameAllCaps.endsWith("DOCUMENT_LOADER")) {