You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/how_to/callbacks_custom_events.ipynb
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,7 @@
15
15
"- [Astream Events API](/docs/concepts/streaming/#astream_events) the `astream_events` method will surface custom callback events.\n",
16
16
":::\n",
17
17
"\n",
18
-
"In some situations, you may want to dipsatch a custom callback event from within a [Runnable](/docs/concepts/runnables) so it can be surfaced\n",
18
+
"In some situations, you may want to dispatch a custom callback event from within a [Runnable](/docs/concepts/runnables) so it can be surfaced\n",
19
19
"in a custom callback handler or via the [Astream Events API](/docs/concepts/streaming/#astream_events).\n",
20
20
"\n",
21
21
"For example, if you have a long running tool with multiple steps, you can dispatch custom events between the steps and use these custom events to monitor progress.\n",
"Loader for converting URLs into Markdown using the pull.md service.\n",
19
+
"\n",
20
+
"This package implements a [document loader](/docs/concepts/document_loaders/) for web content. Unlike traditional web scrapers, PullMdLoader can handle web pages built with dynamic JavaScript frameworks like React, Angular, or Vue.js, converting them into Markdown without local rendering.\n",
21
+
"\n",
22
+
"## Overview\n",
23
+
"### Integration details\n",
24
+
"\n",
25
+
"| Class | Package | Local | Serializable | JS Support |\n",
" 'page_content': '# Example Domain\\nThis domain is used for illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission.'}"
88
+
]
89
+
},
90
+
"execution_count": 12,
91
+
"metadata": {},
92
+
"output_type": "execute_result"
93
+
}
94
+
],
95
+
"source": [
96
+
"documents[0].metadata"
97
+
]
98
+
},
99
+
{
100
+
"cell_type": "markdown",
101
+
"metadata": {},
102
+
"source": [
103
+
"## Lazy Load\n",
104
+
"\n",
105
+
"No lazy loading is implemented. `PullMdLoader` performs a real-time conversion of the provided URL into Markdown format whenever the `load` method is called."
>[PullMd](https://pull.md/) is a service that converts web pages into Markdown format. The `langchain-pull-md` package utilizes this service to convert URLs, especially those rendered with JavaScript frameworks like React, Angular, or Vue.js, into Markdown without the need for local rendering.
4
+
5
+
## Installation and Setup
6
+
7
+
To get started with `langchain-pull-md`, you need to install the package via pip:
8
+
9
+
```bash
10
+
pip install langchain-pull-md
11
+
```
12
+
13
+
See the [usage example](/docs/integrations/document_loaders/pull_md) for detailed integration and usage instructions.
14
+
15
+
## Document Loader
16
+
17
+
The `PullMdLoader` class in `langchain-pull-md` provides an easy way to convert URLs to Markdown. It's particularly useful for loading content from modern web applications for use within LangChain's processing capabilities.
18
+
19
+
```python
20
+
from langchain_pull_md import PullMdLoader
21
+
22
+
# Initialize the loader with a URL of a JavaScript-rendered webpage
23
+
loader = PullMdLoader(url='https://example.com')
24
+
25
+
# Load the content as a Document
26
+
documents = loader.load()
27
+
28
+
# Access the Markdown content
29
+
for document in documents:
30
+
print(document.page_content)
31
+
```
32
+
33
+
This loader supports any URL and is particularly adept at handling sites built with dynamic JavaScript, making it a versatile tool for markdown extraction in data processing workflows.
34
+
35
+
## API Reference
36
+
37
+
For a comprehensive guide to all available functions and their parameters, visit the [API reference](https://github.com/chigwell/langchain-pull-md).
0 commit comments