o
    ٰi                     @   sT   d dl mZ erd dl mZ d dlmZmZ dddefddZ			
		dddZdS )    )TYPE_CHECKING)Union)ResponseInputParamResponseInputItemParammessager   returnc                 C   s0   t | tr| ddksdS d| vp| d dkS )NrolesystemFtyper   )
isinstancedictget)r    r   W/home/ubuntu/.local/lib/python3.10/site-packages/sentry_sdk/ai/_openai_responses_api.py_is_system_instruction	   s   r   messagesUnion[str, ResponseInputParam]list[ResponseInputItemParam]c                 C   s   t | tsg S dd | D S )Nc                 S   s   g | ]}t |r|qS r   )r   ).0r   r   r   r   
<listcomp>   s    z,_get_system_instructions.<locals>.<listcomp>)r   list)r   r   r   r   _get_system_instructions   s   
r   N)r   r   r   r   )	typingr   r   openai.types.responsesr   r   boolr   r   r   r   r   r   <module>   s    