o
    i                     @   sR   d Z ddlmZmZmZmZ ddlmZ deeee	ef ef  defddZ
dS )	z&Utility functions for Google services.    )AnyDictOptionalUnion)versionhttp_optionsreturnc                 C   s   ddt   i}| du rd|i} | S t| tr.|  } d| v r(| d | | S || d< | S t| drC| jdu r=|| _| S | j| | S )a  Updates http_options with the x-goog-api-client header.

    Args:
        http_options: The existing http_options, which can be None, a dictionary,
                      or an object with a 'headers' attribute.

    Returns:
        The updated http_options.
    zx-goog-api-clientzpipecat/Nheaders)pipecat_version
isinstancedictcopyupdatehasattrr	   )r   client_header r   Q/home/ubuntu/.local/lib/python3.10/site-packages/pipecat/services/google/utils.py!update_google_client_http_options   s"   

	

r   N)__doc__typingr   r   r   r   pipecatr   r
   strr   r   r   r   r   <module>   s   *