Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
bracesproul committed Aug 2, 2024
1 parent dc1d1d1 commit 7523f7a
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 6 deletions.
39 changes: 39 additions & 0 deletions libs/langchain-scripts/src/cli/README.md
Original file line number Diff line number Diff line change
@@ -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 <Class Name> --type <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.
12 changes: 6 additions & 6 deletions libs/langchain-scripts/src/cli/docs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -51,8 +51,8 @@ async function main() {
className,
});
break;
case "embeddings":
await fillEmbeddingsIntegrationDocTemplate({
case "doc_loader":
await fillDocLoaderIntegrationDocTemplate({
className,
});
break;
Expand Down

0 comments on commit 7523f7a

Please sign in to comment.