factor extraction pipeline ready (#16)

* run the code

* update code

* remove some redundant code

---------

Co-authored-by: xuyang1 <xuyang1@microsoft.com>
This commit is contained in:
Xu Yang
2024-06-05 15:36:15 +08:00
committed by GitHub
parent 62a2f7a742
commit 1e77557293
30 changed files with 633 additions and 440 deletions
+3 -9
View File
@@ -5,18 +5,12 @@ from pathlib import Path
import yaml
from azure.ai.formrecognizer import DocumentAnalysisClient
from azure.core.credentials import AzureKeyCredential
from finco.conf import FincoSettings as Config
if TYPE_CHECKING:
from langchain_core.documents import Document
from rdagent.core.conf import FincoSettings as Config
from rdagent.core.prompts import Prompts
from langchain_core.documents import Document
from langchain.document_loaders import PyPDFDirectoryLoader, PyPDFLoader
with (Path(__file__).parent / "util_prompt.yaml").open(encoding="utf8") as f:
UTIL_PROMPT = yaml.safe_load(
f,
)
def load_documents_by_langchain(path: Path) -> list:
"""Load documents from the specified path.