
'''simple docstring'''






import re

from ..utils import cached_file


# docstyle-ignore
A			      =      '\nHuman: <<task>>\n\nAssistant: '


A			      =      'huggingface-tools/default-prompts'
A			      =      {'chat': 'chat_prompt_template.txt', 'run': 'run_prompt_template.txt'}





def    UpperCAmelCase							(  UpperCAmelCase__							:							List[str]       ,							UpperCAmelCase__							:							Dict       ,							UpperCAmelCase__							:							Optional[int]="run"):
				if prompt_or_repo_id is None:
								lowerCamelCase					:			Union[str, Any]									= DEFAULT_PROMPTS_REPO

				# prompt is considered a repo ID when it does not contain any kind of space
				if re.search('\\s'       ,							UpperCAmelCase__) is not None:
								return prompt_or_repo_id

				lowerCamelCase					:			Optional[Any]									= cached_file(
				    UpperCAmelCase__       ,							PROMPT_FILES[mode]       ,							repo_type='dataset'       ,							user_agent={'agent': agent_name})
				with open(UpperCAmelCase__       ,							'r'       ,							encoding='utf-8') as f:
								return f.read()





'''simple docstring'''






import numpy as np





def    UpperCAmelCase							(  UpperCAmelCase__							:							np.array):
				return 1 / (1 + np.exp(-vector))


if __name__ == "__main__":
					import doctest

					doctest.testmod()
