Modern Treasury

Modern Treasuryopen in new window简化了复杂的支付操作。它是一个统一的平台,用于支持处理和转移资金的产品和流程。

  • 连接银行和支付系统
  • 实时跟踪交易和余额
  • 为规模化自动化支付操作

本文档介绍了如何从 Modern Treasury REST API 加载数据,并将其转换为可用于加载到 LangChain 中的格式,同时提供了用于矢量化的示例用法。

import os


from langchain.document_loaders import ModernTreasuryLoader
from langchain.indexes import VectorstoreIndexCreator

Modern Treasury API 需要组织 ID 和 API 密钥,可以在 Modern Treasury 仪表板的开发者设置中找到。

此文档加载程序还需要一个 resource 选项,用于定义您要加载的数据。

以下资源可用:

payment_orders 文档open in new window

expected_payments 文档open in new window

returns 文档open in new window

incoming_payment_details 文档open in new window

counterparties 文档open in new window

internal_accounts 文档open in new window

external_accounts 文档open in new window

transactions 文档open in new window

ledgers 文档open in new window

ledger_accounts 文档open in new window

ledger_transactions 文档open in new window

events 文档open in new window

invoices 文档open in new window

modern_treasury_loader = ModernTreasuryLoader("payment_orders")
# 从加载器创建一个 vectorstore 检索器
# 更多详细信息请参阅 https://python.langchain.com/en/latest/modules/indexes/getting_started.html

index = VectorstoreIndexCreator().from_loaders([modern_treasury_loader])
modern_treasury_doc_retriever = index.vectorstore.as_retriever()
Last Updated:
Contributors: 刘强