Skip to main content

file_handling.py

Source: sunholo/genai/file_handling.py

Functions

construct_file_content(gs_list, bucket: str)

Args:

  • gs_list: a list of dicts representing files in a bucket
    • contentType: The content type of the file on GCS
    • storagePath: The path in the bucket
    • name: The name of the file
  • bucket: The bucket the files are in

download_gcs_upload_genai(img_url, mime_type, name=None, display_url=None, display_name=None, retries=3, delay=2)

No docstring available.

download_file_with_error_handling(img_url, mime_type, name)

No docstring available.

sanitize_file(filename)

No docstring available.

Sunholo Multivac

Get in touch to see if we can help with your GenAI project.

Contact us

Other Links

Sunholo Multivac - GenAIOps

Copyright ©

Holosun ApS 2024