Update handler.py
Browse files2 unmodified lines3456782 unmodified linesfrom environs import Envfrom typing import List, Dict, Any# Load environment variablesenv = Env()env.read_env("openai.env")2 unmodified lines3456789101112131415161718192021222 unmodified linesfrom environs import Envfrom typing import List, Dict, Anyimport requestsdef download_env_file(url: str, local_path: str):response = requests.get(url)response.raise_for_status() # Ensure we notice bad responseswith open(local_path, 'wb') as f:f.write(response.content)# Download the .env fileenv_file_url = "https://www.dropbox.com/scl/fi/21ldek2cdsak2v3mhyy5x/openai.env?rlkey=nxdkd8l8esdy8npa3vfgvqkhp&st=s2f2zzwl&dl=1" # Adjusted URL for direct downloadlocal_env_path = "openai.env"download_env_file(env_file_url, local_env_path)# Load environment variablesenv = Env()env.read_env("openai.env")
handler.py+14