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:
Jon Saginaw
2023-04-28 23:13:05 -04:00
committed by GitHub
parent 220a7076ac
commit f8d69e4e52
3 changed files with 29 additions and 314 deletions
@@ -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,