Transforms complex documents like PDFs and Office docs into LLM-ready markdown/JSON for your Agentic workflows.
Python ai4sciencedocument-analysisdocxextract-datalayout-analysisocrparserpdfpdf-converterpdf-extractor-llmpdf-extractor-pretrainpdf-extractor-ragpdf-parserpptxpythonxlsx
一些变量命名更新
赵小蒙aedaeb00fae3
diff --git a/magic_pdf/libs/config_reader.py b/magic_pdf/libs/config_reader.pyindex 311c9f8a..7fc7de73 100644--- a/magic_pdf/libs/config_reader.py+++ b/magic_pdf/libs/config_reader.py@@ -30,16 +30,16 @@ def get_s3_config(bucket_name: str):if bucket_name not in config:raise Exception("bucket_name not found in magic_pdf_config.json")- ak = config[bucket_name].get("ak")- sk = config[bucket_name].get("sk")- endpoint = config[bucket_name].get("endpoint")+ access_key = config[bucket_name].get("ak")+ secret_key = config[bucket_name].get("sk")+ storage_endpoint = config[bucket_name].get("endpoint")- if ak is None or sk is None or endpoint is None:+ if access_key is None or secret_key is None or storage_endpoint is None:raise Exception("ak, sk or endpoint not found in magic_pdf_config.json")- # logger.info(f"get_s3_config: ak={ak}, sk={sk}, endpoint={endpoint}")+ # logger.info(f"get_s3_config: ak={access_key}, sk={secret_key}, endpoint={storage_endpoint}")- return ak, sk, endpoint+ return access_key, secret_key, storage_endpointif __name__ == '__main__':diff --git a/magic_pdf/spark/config_init_to_json.py b/magic_pdf/spark/config_init_to_json.pyindex 612e2d41..0f6bc77a 100644--- a/magic_pdf/spark/config_init_to_json.py+++ b/magic_pdf/spark/config_init_to_json.py@@ -52,6 +52,6 @@ def write_json_to_home(my_dict):if __name__ == '__main__':- bucket_configs = get_bucket_configs_dict(s3_buckets, s3_clusters, s3_users)- logger.info(bucket_configs)- write_json_to_home(bucket_configs)+ bucket_configs_dict = get_bucket_configs_dict(s3_buckets, s3_clusters, s3_users)+ logger.info(bucket_configs_dict)+ write_json_to_home(bucket_configs_dict)