o
    i                     @   s0  U d dl mZ d dlZd dlZd dlZddlmZ ddlmZ ddlmZ	 ej
dejd	ejejd
dddejejddddgdge	dddddZej
dejd	ejejddddgdge	dddddZeeZde_eeZde_eeZde_eeZdej_ejdkrejdZnejdZeeZdej_eej_dej_eeZdej_eej_dej_ej ddedej d d!ded"ej d#dedej d$dedej d%d&edej d'd(ed)d*ej d+d(ed)d*ej d,d(ed)d*gZ!e"ej  e#d-< ej$e%e& d.e!d/gZ'd0Z(ej)j*d1d2 Z+dS )3    )deepcopyN   )types   )pytest_helper)_transformerszgemini-2.5-flashuserz:gs://cloud-samples-data/generative-ai/pdf/2312.11805v3.pdfzapplication/pdf)fileUrimimeType)fileDataz8gs://cloud-samples-data/generative-ai/pdf/2403.05530.pdf)rolepartsz What is the sum of the two pdfs?z
test cache86400s)contentssystem_instructiondisplay_namettlmodelconfigzChttps://generativelanguage.googleapis.com/v1beta/files/v200dhvn15h7)r
   r	   zmodels/gemini-2.5-flashz)publishers/google/models/gemini-2.5-flashzUprojects/test-project/locations/us-central1/keyRings/test-keyring/cryptoKeys/test-key)r      z2025-12-20T00:00:00Zz2025-12-20T00:00:00+00:00test_caches_create_with_gcs_uriINVALID_ARGUMENT)nameexception_if_mldev
parameters$test_caches_create_with_gcs_uri_cmekznot supported)r   r   exception_if_vertexr   +test_caches_create_with_gcs_uri_expire_time'test_caches_create_model_partial_path_1'test_caches_create_model_partial_path_2404%test_caches_create_with_googleai_fileInternalz+Create is not reproducible in the API mode.)r   r   r   skip_in_api_mode1test_caches_create_with_googleai_file_expire_time:test_caches_create_with_googleai_file_model_partial_path_1
test_tablezcaches.create)fileglobals_for_filetest_methodr'   )pytest_asyncioc                    sv   | j jr+tt | jjjtj	tj
dI d H  W d    d S 1 s$w   Y  d S | jjjtj	tj
dI d H  d S )Nr   )_api_clientvertexaipytestraises	Exceptionaiocachescreate/_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILEr   r   )client r6   c/home/ubuntu/transcripts/venv/lib/python3.10/site-packages/google/genai/tests/caches/test_create.pytest_async_googleai_file_create   s   "r8   ),copyr   datetimer.   sys r   r   r   t_CreateCachedContentParametersContentPartFileData	t_content)_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URIr4   9_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_PARTIAL_MODEL_1r   9_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_PARTIAL_MODEL_2?_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILE_PARTIAL_MODEL_1._CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_CMEKr   kms_key_nameversion_infofromisoformat_EXPIRE_TIME5_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_EXPIRE_TIMEr   expire_timer   ;_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILE_EXPIRE_TIMETestTableItemr'   list__annotations__setup__file__globals
pytestmarkpytest_pluginsmarkasyncior8   r6   r6   r6   r7   <module>   s  
/