Skip to content

Commit

Permalink
docs: update README (#3)
Browse files Browse the repository at this point in the history
Signed-off-by: Panos Vagenas <[email protected]>
  • Loading branch information
vagenas authored Jan 9, 2025
1 parent 5ca3e11 commit aa50365
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,34 @@ pip install langchain-docling

## Usage

Basic usage looks as follows:
### Basic usage

Basic usage of `DoclingLoader` looks as follows:

```python
from langchain_docling import DoclingLoader

FILE_PATH = ["https://arxiv.org/pdf/2408.09869"] # Docling Technical Report

loader = DoclingLoader(file_path=FILE_PATH)

docs = loader.load()
```

For end-to-end usage samples check out the [examples](examples/).
### Advanced usage

When initializing a `DoclingLoader`, you can use the following parameters:

- `file_path`: source as single str (URL or local file) or iterable thereof
- `converter` (optional): any specific Docling converter instance to use
- `convert_kwargs` (optional): any specific kwargs for conversion execution
- `export_type` (optional): export mode to use: `ExportType.DOC_CHUNKS` (default) or
`ExportType.MARKDOWN`
- `md_export_kwargs` (optional): any specific Markdown export kwargs (for Markdown mode)
- `chunker` (optional): any specific Docling chunker instance to use (for doc-chunk
mode)
- `meta_extractor` (optional): any specific metadata extractor to use

### Example

For an end-to-end usage example, check out
[this notebook](https://ds4sd.github.io/docling/examples/rag_langchain/).

0 comments on commit aa50365

Please sign in to comment.