MCPcopy Create free account
hub / github.com/Azure-Samples/llama-index-python / get_documents

Function get_documents

backend/app/engine/loaders/__init__.py:19–39  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def get_documents():
20 documents = []
21 config = load_configs()
22 for loader_type, loader_config in config.items():
23 logger.info(
24 f"Loading documents from loader: {loader_type}, config: {loader_config}"
25 )
26 match loader_type:
27 case "file":
28 document = get_file_documents(FileLoaderConfig(**loader_config))
29 case "web":
30 document = get_web_documents(WebLoaderConfig(**loader_config))
31 case "db":
32 document = get_db_documents(
33 configs=[DBLoaderConfig(**cfg) for cfg in loader_config]
34 )
35 case _:
36 raise ValueError(f"Invalid loader type: {loader_type}")
37 documents.extend(document)
38
39 return documents

Callers 1

generate_datasourceFunction · 0.90

Calls 7

get_file_documentsFunction · 0.90
FileLoaderConfigClass · 0.90
get_web_documentsFunction · 0.90
WebLoaderConfigClass · 0.90
get_db_documentsFunction · 0.90
DBLoaderConfigClass · 0.90
load_configsFunction · 0.85

Tested by

no test coverage detected