动物区系
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 参考:FaunaLoader
使用 Pagination 查询
您将获得一个after值(如果有更多数据)。您可以通过传入afterstring 在 query 中。
要了解更多信息,请点击此链接
query = """
Item.paginate("hs+DzoPOg ... aY1hOohozrV7A")
Item.all()
"""
loader = FaunaLoader(query, field, secret)