




'''simple docstring'''


from typing import TYPE_CHECKING

from ...utils import (
    OptionalDependencyNotAvailable,
    _LazyModule,
    is_flax_available,
    is_tf_available,
    is_tokenizers_available,
    is_torch_available,
)


_snake_case   :   Any     							=	{
    '''configuration_blenderbot''': [
        '''BLENDERBOT_PRETRAINED_CONFIG_ARCHIVE_MAP''',
        '''BlenderbotConfig''',
        '''BlenderbotOnnxConfig''',
    ],
    '''tokenization_blenderbot''': ['''BlenderbotTokenizer'''],
}

try:
				if not is_tokenizers_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_snake_case   :   str     							=	['''BlenderbotTokenizerFast''']

try:
				if not is_torch_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_snake_case   :   Tuple     							=	[
				    '''BLENDERBOT_PRETRAINED_MODEL_ARCHIVE_LIST''',
				    '''BlenderbotForCausalLM''',
				    '''BlenderbotForConditionalGeneration''',
				    '''BlenderbotModel''',
				    '''BlenderbotPreTrainedModel''',
				]


try:
				if not is_tf_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_snake_case   :   Dict     							=	[
				    '''TFBlenderbotForConditionalGeneration''',
				    '''TFBlenderbotModel''',
				    '''TFBlenderbotPreTrainedModel''',
				]


try:
				if not is_flax_available():
								raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
				pass
else:
				_snake_case   :   List[str]     							=	[
				    '''FlaxBlenderbotForConditionalGeneration''',
				    '''FlaxBlenderbotModel''',
				    '''FlaxBlenderbotPreTrainedModel''',
				]


if TYPE_CHECKING:
				from .configuration_blenderbot import (
				    BLENDERBOT_PRETRAINED_CONFIG_ARCHIVE_MAP,
				    BlenderbotConfig,
				    BlenderbotOnnxConfig,
				)
				from .tokenization_blenderbot import BlenderbotTokenizer

				try:
								if not is_tokenizers_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .tokenization_blenderbot_fast import BlenderbotTokenizerFast

				try:
								if not is_torch_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_blenderbot import (
								    BLENDERBOT_PRETRAINED_MODEL_ARCHIVE_LIST,
								    BlenderbotForCausalLM,
								    BlenderbotForConditionalGeneration,
								    BlenderbotModel,
								    BlenderbotPreTrainedModel,
								)

				try:
								if not is_tf_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_tf_blenderbot import (
								    TFBlenderbotForConditionalGeneration,
								    TFBlenderbotModel,
								    TFBlenderbotPreTrainedModel,
								)

				try:
								if not is_flax_available():
												raise OptionalDependencyNotAvailable()
				except OptionalDependencyNotAvailable:
								pass
				else:
								from .modeling_flax_blenderbot import (
								    FlaxBlenderbotForConditionalGeneration,
								    FlaxBlenderbotModel,
								    FlaxBlenderbotPreTrainedModel,
								)

else:
				import sys

				_snake_case   :   int     							=	_LazyModule(__name__, globals()['__file__'], _import_structure, module_spec=__spec__)












'''simple docstring'''


import os
import sys
from contextlib import contextmanager


# Windows only
if os.name == "nt":
				import ctypes
				import msvcrt  # noqa

				class     A					(	ctypes.Structure					):
											# _fields is a specific attr expected by ctypes
											lowercase_           =       [('size', ctypes.c_int), ('visible', ctypes.c_byte)]
def 	snake_case_					():





							'''simple docstring'''


							if os.name == "nt":
														_a			  =       CursorInfo()
														_a			  =       ctypes.windll.kernelaa.GetStdHandle(-11   )
														ctypes.windll.kernelaa.GetConsoleCursorInfo(UpperCamelCase				,		ctypes.byref(UpperCamelCase   )   )
														_a			  =       False
														ctypes.windll.kernelaa.SetConsoleCursorInfo(UpperCamelCase				,		ctypes.byref(UpperCamelCase   )   )
							elif os.name == "posix":
														sys.stdout.write('''\033[?25l'''   )
														sys.stdout.flush()
def 	snake_case_					():





							'''simple docstring'''


							if os.name == "nt":
														_a			  =       CursorInfo()
														_a			  =       ctypes.windll.kernelaa.GetStdHandle(-11   )
														ctypes.windll.kernelaa.GetConsoleCursorInfo(UpperCamelCase				,		ctypes.byref(UpperCamelCase   )   )
														_a			  =       True
														ctypes.windll.kernelaa.SetConsoleCursorInfo(UpperCamelCase				,		ctypes.byref(UpperCamelCase   )   )
							elif os.name == "posix":
														sys.stdout.write('''\033[?25h'''   )
														sys.stdout.flush()

@contextmanager
def 	snake_case_					():





							'''simple docstring'''


							try:
														hide_cursor()
														yield
							finally:
														show_cursor()

