o
    Yi                     @   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)ZfileDataz8gs://cloud-samples-data/generative-ai/pdf/2403.05530.pdf)Zrolepartsz What is the sum of the two pdfs?z
test cacheZ86400s)contentsZ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:00Ztest_caches_create_with_gcs_uriZINVALID_ARGUMENT)nameexception_if_mldev
parametersZ$test_caches_create_with_gcs_uri_cmekznot supported)r   r   exception_if_vertexr   Z+test_caches_create_with_gcs_uri_expire_timeZ'test_caches_create_model_partial_path_1Z'test_caches_create_model_partial_path_2Z404Z%test_caches_create_with_googleai_fileZInternalz+Create is not reproducible in the API mode.)r   r   r   Zskip_in_api_modeZ1test_caches_create_with_googleai_file_expire_timeZ:test_caches_create_with_googleai_file_model_partial_path_1
test_tablezcaches.create)fileZglobals_for_fileZtest_methodr   )Z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   )Z_api_clientZvertexaipytestZraises	ExceptionZaiocachescreate/_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILEr   r   )client r   _/home/kim/smarthome/.venv/lib/python3.10/site-packages/google/genai/tests/caches/test_create.pytest_async_googleai_file_create   s   "r!   ),copyr   datetimer   sys r   r   r   tZ_CreateCachedContentParametersZContentZPartZFileDataZ	t_contentZ)_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URIr   Z9_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_PARTIAL_MODEL_1r   Z9_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_PARTIAL_MODEL_2Z?_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILE_PARTIAL_MODEL_1Z._CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_CMEKr   Zkms_key_nameversion_infofromisoformatZ_EXPIRE_TIMEZ5_CREATE_CACHED_CONTENT_PARAMETERS_GCS_URI_EXPIRE_TIMEr   expire_timer   Z;_CREATE_CACHED_CONTENT_PARAMETERS_GOOGLEAI_FILE_EXPIRE_TIMEZTestTableItemr   list__annotations__setup__file__globalsZ
pytestmarkZpytest_pluginsmarkZasyncior!   r   r   r   r    <module>   s  
/