Added logging for updated files #81

Open
sgode wants to merge 3 commits from logging into main
Showing only changes of commit d1ab43d02e - Show all commits

View File

@ -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.""" """Generate a meta description using the llama.cpp /completion endpoint with up to 3 retries."""
content_preview = text[:2000].replace("\n", " ") content_preview = text[:2000].replace("\n", " ")
prompt = ( prompt = (
f"Generate a meta description (40-160 chars) for: {service_title}." 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"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"Content preview: {content_preview}."
f"Output ONLY the description text, nothing else." 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.""" """Generate keywords using the llama.cpp /completion endpoint with up to 3 retries."""
content_preview = text[:2000].replace("\n", " ") content_preview = text[:2000].replace("\n", " ")
prompt = ( prompt = (
f"Generate up to 5 keywords (comma-separated) for: {service_title}. " 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"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"Content preview: {content_preview}. "
f"Output ONLY comma-separated keywords, nothing else." f"Output ONLY comma-separated keywords, nothing else."
) )