From a4c114b9a9934ad4620bd9998f8e7f73ad083251 Mon Sep 17 00:00:00 2001 From: Sebastian Gode Date: Wed, 4 Mar 2026 13:23:30 +0000 Subject: [PATCH 1/3] Added logging for updated files --- tools/generate_meta.py | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/tools/generate_meta.py b/tools/generate_meta.py index cba62f8..6d9c334 100755 --- a/tools/generate_meta.py +++ b/tools/generate_meta.py @@ -256,6 +256,7 @@ def process_service(args, service): repo_dir = None git_repo = None error_list = [] + files_updated = 0 repo = None for r in service["repositories"]: @@ -352,6 +353,7 @@ def process_service(args, service): if add_sphinx_metadata(rst_file, description, keywords): updated_count += 1 + files_updated += 1 logging.info(f"Added meta description and keywords to {rst_file}") else: processed_count += 1 @@ -386,6 +388,8 @@ def process_service(args, service): logging.error(error_list) logging.info(f"Processed {processed_count} files, updated {updated_count} files") + + return files_updated def main(): @@ -445,7 +449,7 @@ def main(): args = parser.parse_args() - logging.basicConfig(level=logging.DEBUG) + logging.basicConfig(level=logging.INFO) services = [] if args.service_type: @@ -453,8 +457,24 @@ def main(): else: services = data.services_with_repos() + total_files_updated = 0 + services_with_updates = [] + for service in services: - process_service(args, service) + files_updated = process_service(args, service) + if files_updated > 0: + total_files_updated += files_updated + services_with_updates.append((service['service_title'], files_updated)) + + print("\n" + "=" * 60) + print("SUMMARY") + print("=" * 60) + print(f"Total files with metadata added: {total_files_updated}") + print(f"Services with updates: {len(services_with_updates)}") + print("\nServices with metadata added:") + for service_title, count in services_with_updates: + print(f" - {service_title}: {count} file(s)") + print("=" * 60) if __name__ == "__main__": -- 2.34.1 From 379d8d7ea81e4fc76cc8ab1cf75a4f8a0e5abfa1 Mon Sep 17 00:00:00 2001 From: Sebastian Gode Date: Wed, 4 Mar 2026 13:27:23 +0000 Subject: [PATCH 2/3] Switch to debug --- tools/generate_meta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/generate_meta.py b/tools/generate_meta.py index 6d9c334..a601353 100755 --- a/tools/generate_meta.py +++ b/tools/generate_meta.py @@ -449,7 +449,7 @@ def main(): args = parser.parse_args() - logging.basicConfig(level=logging.INFO) + logging.basicConfig(level=logging.DEBUG) services = [] if args.service_type: -- 2.34.1 From d1ab43d02e1775bd94a106c4afbbd192e91deba2 Mon Sep 17 00:00:00 2001 From: Sebastian Gode Date: Wed, 4 Mar 2026 13:43:01 +0000 Subject: [PATCH 3/3] prompt fix --- tools/generate_meta.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/generate_meta.py b/tools/generate_meta.py index a601353..7114a40 100755 --- a/tools/generate_meta.py +++ b/tools/generate_meta.py @@ -86,8 +86,9 @@ def generate_description_with_llm(text, service_title, llm_api_url, model_name, """Generate a meta description using the llama.cpp /completion endpoint with up to 3 retries.""" content_preview = text[:2000].replace("\n", " ") prompt = ( - f"Generate a meta description (40-160 chars) for: {service_title}." - f"This is a service from the cloud provider called 'T Cloud Public', do not mention other Cloud Providers or services from them." + f"Generate a meta description (40-160 chars) for the T Cloud Public service: {service_title}." + f"This is a service from the cloud provider called 'T Cloud Public', do NOT mention other Cloud Providers or services from them." + f"NEVER mention AWS, Azure, Huawei, Alibaba, GCP and similiar cloud providers." f"Content preview: {content_preview}." f"Output ONLY the description text, nothing else." ) @@ -160,8 +161,9 @@ def generate_keywords_with_llm(text, service_title, llm_api_url, model_name, api """Generate keywords using the llama.cpp /completion endpoint with up to 3 retries.""" content_preview = text[:2000].replace("\n", " ") prompt = ( - f"Generate up to 5 keywords (comma-separated) for: {service_title}. " - f"This is a service from the cloud provider called 'T Cloud Public', do not mention other Cloud Providers or services from them." + f"Generate up to 5 keywords (comma-separated) for the T Cloud Public service: {service_title}. " + f"This is a service from the cloud provider called 'T Cloud Public', do NOT mention other Cloud Providers or services from them." + f"NEVER mention AWS, Azure, Huawei, Alibaba, GCP and similiar cloud providers." f"Content preview: {content_preview}. " f"Output ONLY comma-separated keywords, nothing else." ) -- 2.34.1