diff --git a/libs/langchain-scripts/src/cli/README.md b/libs/langchain-scripts/src/cli/README.md new file mode 100644 index 000000000000..6dfe68d7601e --- /dev/null +++ b/libs/langchain-scripts/src/cli/README.md @@ -0,0 +1,39 @@ +# Integration doc CLI + +Generate integration documentation using the CLI. + +## Supported integration types + +- Chat models +- LLMs +- Text embeddings +- Retrievers +- Document loaders + +## Usage + +1. Build the CLI: + +```bash +yarn build --filter=@langchain/scripts +``` + +2. Run the CLI: + +```bash +yarn create:integration:doc --classname --type +``` + +The `--classname` field should be passed the full class name of the integration, e.g `ChatOpenAI` or `RecursiveUrlLoader`. + +The `--type` field should be passed the type of the integration. It must be one of the following: + +- `chat` +- `llm` +- `embeddings` +- `retriever` +- `doc_loader` + +After invoking the script, you'll be prompted to fill out more integration-specific information. + +Finally, the script will log the path of the newly created integration documentation. You should open this notebook, run all the cells, handle and remove any TODOs, and verify all links work as expected. diff --git a/libs/langchain-scripts/src/cli/docs/index.ts b/libs/langchain-scripts/src/cli/docs/index.ts index 1e4cbb026f44..a4ab18784d36 100644 --- a/libs/langchain-scripts/src/cli/docs/index.ts +++ b/libs/langchain-scripts/src/cli/docs/index.ts @@ -36,13 +36,13 @@ async function main() { className, }); break; - case "doc_loader": - await fillDocLoaderIntegrationDocTemplate({ + case "llm": + await fillLLMIntegrationDocTemplate({ className, }); break; - case "llm": - await fillLLMIntegrationDocTemplate({ + case "embeddings": + await fillEmbeddingsIntegrationDocTemplate({ className, }); break; @@ -51,8 +51,8 @@ async function main() { className, }); break; - case "embeddings": - await fillEmbeddingsIntegrationDocTemplate({ + case "doc_loader": + await fillDocLoaderIntegrationDocTemplate({ className, }); break;