mirror of
https://github.com/langchain-ai/langchain.git
synced 2026-10-11 20:35:14 +03:00
This can only be reviewed by [hiding whitespaces](https://github.com/langchain-ai/langchain/pull/30302/files?diff=unified&w=1). The motivation behind this PR is to get my hands on the docs and make the LangSmith teasing short and clear. Right now I don't know how to do it, but this could be an include in the future. --------- Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
6.7 KiB
6.7 KiB
In [ ]:
import getpass
import os
os.environ["__MODULE_NAME___API_KEY"] = getpass.getpass("Enter your __ModuleName__ API key: ")In [ ]:
# os.environ["LANGSMITH_API_KEY"] = getpass.getpass("Enter your LangSmith API key: ")
# os.environ["LANGSMITH_TRACING"] = "true"In [ ]:
%pip install -qU langchain_communityIn [ ]:
from langchain_community.document_loaders import __ModuleName__Loader
loader = __ModuleName__Loader(
# required params = ...
# optional params = ...
)In [ ]:
docs = loader.load()
docs[0]In [ ]:
print(docs[0].metadata)In [ ]:
page = []
for doc in loader.lazy_load():
page.append(doc)
if len(page) >= 10:
# do some paged operation, e.g.
# index.upsert(page)
page = []