U
    ·ÜŸj›  ã                   @  sÄ   U d dl mZ d dlmZmZ d dlmZ ddlmZ ddl	m
Z
 dZG dd	„ d	e
ƒZG d
d„ dee ƒZdddddddddddddddgZeržg Zded< neZeƒ ZeD ]Zeed�ee< q¬dS )é    )Úannotations)ÚTYPE_CHECKINGÚAny)Úoverrideé   )Ú	LazyProxy)ÚOpenAIErroraÌ  

You tried to access openai.{symbol}, but this is no longer supported in openai>=1.0.0 - see the README at https://github.com/openai/openai-python for the API.

You can run `openai migrate` to automatically upgrade your codebase to use the 1.0.0 interface. 

Alternatively, you can pin your installation to the old version, e.g. `pip install openai==0.28`

A detailed migration guide is available here: https://github.com/openai/openai-python/discussions/742
c                      s$   e Zd Zdddœ‡ fdd„Z‡  ZS )ÚAPIRemovedInV1ÚstrÚNone©ÚsymbolÚreturnc                  s   t ƒ  tj|d�¡ d S ©N©r   )ÚsuperÚ__init__ÚINSTRUCTIONSÚformat©Úselfr   ©Ú	__class__© ú7/tmp/pip-unpacked-wheel-2qj3ofc_/openai/lib/_old_api.pyr      s    zAPIRemovedInV1.__init__)Ú__name__Ú
__module__Ú__qualname__r   Ú__classcell__r   r   r   r   r	      s   r	   c                      sH   e Zd Zdddœ‡ fdd„Zeddœdd	„ƒZdddd
œdd„Z‡  ZS )ÚAPIRemovedInV1Proxyr
   r   r   c                  s   t ƒ  ¡  || _d S ©N)r   r   Ú_symbolr   r   r   r   r      s    
zAPIRemovedInV1Proxy.__init__r   )r   c                 C  s   | S r    r   )r   r   r   r   Ú__load__   s    zAPIRemovedInV1Proxy.__load__)Ú_argsÚ_kwargsr   c                 O  s   t | jd�‚d S r   )r	   r!   )r   r#   r$   r   r   r   Ú__call__&   s    zAPIRemovedInV1Proxy.__call__)r   r   r   r   r   r"   r%   r   r   r   r   r   r      s   r   ZEditZFileZAudioZImageZModelZEngineZCustomerZFineTuneZ	EmbeddingZ
CompletionZ
DeploymentZ
ModerationZErrorObjectZFineTuningJobZChatCompletionz	list[str]Ú__all__r   N)Ú
__future__r   Útypingr   r   Útyping_extensionsr   Ú_utilsr   Ú_exceptionsr   r   r	   r   ZSYMBOLSr&   Ú__annotations__ÚlocalsZ__localsr   r   r   r   r   Ú<module>   s<    ñ