o
    ?Hh                     @  sF   d dl mZ d dlZd dlmZmZ dd
dZe dddddZdS )    )annotationsN)AnyCallablefuncCallable[..., Any]arg_namestrreturnboolc                 C  s   t | }||jv S )zBReturns whether or not the given function has a specific parameter)inspect	signature
parameters)r   r   sig r   Y/home/air/sanwanet/gpt-api/venv/lib/python3.10/site-packages/openai/_utils/_reflection.pyfunction_has_argument   s   

r    )exclude_paramsdescriptionsource_func
check_funcr   set[str]r   Nonec          
   
   C  s   t |}t | }g }|j D ]6\}}||v rq|j|}	|	s,|d| d q|	j|jkrG|d| dt|j dt|	j  qq|r[tt	| d| dd
| d	S )
zCEnsure that the signature of the second function matches the first.zthe `z` param is missingztypes for the `z!` param are do not match; source=z
 checking=z- errors encountered when comparing signaturesz:

z

N)r   r   r   itemsgetappend
annotationreprAssertionErrorlenjoin)
r   r   r   r   	check_sig
source_sigerrorsnamesource_paramcustom_paramr   r   r   assert_signatures_in_sync   s*   
	
 r'   )r   r   r   r   r	   r
   )
r   r   r   r   r   r   r   r   r	   r   )	
__future__r   r   typingr   r   r   setr'   r   r   r   r   <module>   s    

