Fauna
Fauna 是一个文档数据库。
查询 Fauna
文档
%pip install --upgrade --quiet fauna
查询数据示例
from langchain_community.document_loaders.fauna import FaunaLoader
secret = "<enter-valid-fauna-secret>"
query = "Item.all()" # Fauna query. Assumes that the collection is called "Item"
field = "text" # The field that contains the page content. Assumes that the field is called "text"
loader = FaunaLoader(query, field, secret)
docs = loader.lazy_load()
for value in docs:
print(value)
API Reference:FaunaLoader
分页查询
如果有更多数据,你会得到一个after
值。你可以通过在查询中传递after
字符串来获取游标之后的值。
了解更多请点击此链接
query = """
Item.paginate("hs+DzoPOg ... aY1hOohozrV7A")
Item.all()
"""
loader = FaunaLoader(query, field, secret)