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 參考文件:FaunaLoader
使用分頁查詢
如果有更多資料,您會取得 after
值。您可以透過在查詢中傳遞 after
字串,取得游標之後的值。
若要瞭解更多資訊,請點擊此連結
query = """
Item.paginate("hs+DzoPOg ... aY1hOohozrV7A")
Item.all()
"""
loader = FaunaLoader(query, field, secret)