The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
community: Add llm-extraction option to FireCrawl Document Loader (#25231)
Shivendra Soni66b7206ab6ef
diff --git a/libs/community/langchain_community/document_loaders/firecrawl.py b/libs/community/langchain_community/document_loaders/firecrawl.pyindex 3ff3bb3b1e..2577ce6eda 100644--- a/libs/community/langchain_community/document_loaders/firecrawl.py+++ b/libs/community/langchain_community/document_loaders/firecrawl.py@@ -63,7 +63,10 @@ class FireCrawlLoader(BaseLoader):f"Unrecognized mode '{self.mode}'. Expected one of 'crawl', 'scrape'.")for doc in firecrawl_docs:- yield Document(- page_content=doc.get("markdown", ""),- metadata=doc.get("metadata", {}),- )+ metadata = doc.get("metadata", {})+ if (self.params is not None) and self.params.get(+ "extractorOptions", {}+ ).get("mode") == "llm-extraction":+ metadata["llm_extraction"] = doc.get("llm_extraction")++ yield Document(page_content=doc.get("markdown", ""), metadata=metadata)