mirror of
https://github.com/Mintplex-Labs/langchain-python.git
synced 2026-08-26 16:55:38 -04:00
Enhancement: Blockchain Document Loader with better Metadata support (#3710)
This PR includes some minor alignment updates, including:
- metadata object extended to support contractAddress, blockchainType,
and tokenId
- notebook doc better aligned to standard langchain format
- startToken changed from int to str to support multiple hex value types
on the Alchemy API
The updated metadata will look like the below. It's possible for a
single contractAddress to exist across multiple blockchains (e.g.
Ethereum, Polygon, etc.) so it's important to include the
blockchainType.
```
metadata = {"source": self.contract_address,
"blockchain": self.blockchainType,
"tokenId": tokenId}
```
This commit is contained in:
@@ -26,7 +26,7 @@ def test_get_nfts_with_pagination() -> None:
|
||||
contract_address = (
|
||||
"0x1a92f7381b9f03921564a437210bb9396471050c" # CoolCats contract address
|
||||
)
|
||||
startToken = 20
|
||||
startToken = "20"
|
||||
|
||||
result = BlockchainDocumentLoader(
|
||||
contract_address,
|
||||
|
||||
Reference in New Issue
Block a user