


from ...configuration_utils import PretrainedConfig
from ...utils import logging


UpperCAmelCase    =					logging.get_logger(__name__)

UpperCAmelCase    =					{"""openai-gpt""": """https://huggingface.co/openai-gpt/resolve/main/config.json"""}







class lowerCAmelCase_		(				_snake_case ):

 '''simple docstring'''

 __snake_case				=						"""openai-gpt"""
 __snake_case				=						{
     """max_position_embeddings""": """n_positions""",
     """hidden_size""": """n_embd""",
     """num_attention_heads""": """n_head""",
     """num_hidden_layers""": """n_layer""",
 }



 def __init__(			self	,   _UpperCAmelCase=4_04_78	,   _UpperCAmelCase=5_12	,   _UpperCAmelCase=7_68	,   _UpperCAmelCase=12	,   _UpperCAmelCase=12	,   _UpperCAmelCase="gelu"	,   _UpperCAmelCase=0.1	,   _UpperCAmelCase=0.1	,   _UpperCAmelCase=0.1	,   _UpperCAmelCase=1E-5	,   _UpperCAmelCase=0.02	,   _UpperCAmelCase="cls_index"	,   _UpperCAmelCase=True	,   _UpperCAmelCase=None	,   _UpperCAmelCase=True	,   _UpperCAmelCase=0.1	,   **_UpperCAmelCase	,   ):
       snake_case_ =   vocab_size
       snake_case_ =   n_positions
       snake_case_ =   n_embd
       snake_case_ =   n_layer
       snake_case_ =   n_head
       snake_case_ =   afn
       snake_case_ =   resid_pdrop
       snake_case_ =   embd_pdrop
       snake_case_ =   attn_pdrop
       snake_case_ =   layer_norm_epsilon
       snake_case_ =   initializer_range
       snake_case_ =   summary_type
       snake_case_ =   summary_use_proj
       snake_case_ =   summary_activation
       snake_case_ =   summary_first_dropout
       snake_case_ =   summary_proj_to_labels
       super().__init__(**snake_case_      )



import requests






def  __lowerCAmelCase					(SCREAMING_SNAKE_CASE      ,      SCREAMING_SNAKE_CASE      )->						None:




      """simple docstring"""

      snake_case_ =   {'''Content-Type''': '''application/json'''}
      snake_case_ =   requests.post(SCREAMING_SNAKE_CASE      ,      json={'''text''': message_body}      ,      headers=SCREAMING_SNAKE_CASE      )
      if response.status_code != 200:
            snake_case_ =   (
                '''Request to slack returned an error '''
                f'''{response.status_code}, the response is:\n{response.text}'''
            )
            raise ValueError(SCREAMING_SNAKE_CASE      )


if __name__ == "__main__":
   # Set the slack url to the one provided by Slack when you create the webhook at
   # https://my.slack.com/services/new/incoming-webhook/
   send_slack_message("""<YOUR MESSAGE BODY>""", """<SLACK CHANNEL URL>""")