in genai-on-vertex-ai/gemini/evals_playbook/utils/evals_playbook.py [0:0]
def save_prompt(self, text, run_path, blob_name):
"""
Saves the given text to a Google Cloud Storage bucket and returns the blob's URI.
Args:
text: The text to be saved.
bucket_name: The name of the GCS bucket.
blob_name: The desired name for the blob (file) in the bucket.
Returns:
The URI of the created blob.
"""
# Construct the full file path in the bucket
gcs_file_path = f'gs://{STAGING_BUCKET}/{run_path}/{blob_name}.txt'
blob_link = write_to_gcs(gcs_file_path, text)
return blob_link