from bluer_options.env import load_config, load_env, get_env

load_env(__name__)
load_config(__name__)

BLUER_AGENT_API_KEY = get_env("BLUER_AGENT_API_KEY")

BLUER_AGENT_AUDIO_TEST_OBJECT = get_env("BLUER_AGENT_AUDIO_TEST_OBJECT")

BLUER_AGENT_CHAT_ENDPOINT = get_env("BLUER_AGENT_CHAT_ENDPOINT")
BLUER_AGENT_CHAT_MAX_TOKENS = get_env("BLUER_AGENT_CHAT_MAX_TOKENS", 3000)
BLUER_AGENT_CHAT_MODEL_NAME = get_env("BLUER_AGENT_CHAT_MODEL_NAME")
BLUER_AGENT_CHAT_TEMPERATURE = get_env("BLUER_AGENT_CHAT_TEMPERATURE", 0.7)
BLUER_AGENT_CHAT_TEST_OBJECT = get_env("BLUER_AGENT_CHAT_TEST_OBJECT")
BLUER_AGENT_CHAT_TIMEOUT = get_env("BLUER_AGENT_CHAT_TIMEOUT", 60)

BLUER_AGENT_MACHINE_USER_NAME = get_env("BLUER_AGENT_MACHINE_USER_NAME")

BLUER_AGENT_RAG_TEST_CORPUS = get_env("BLUER_AGENT_RAG_TEST_CORPUS")

BLUER_AGENT_TRANSCRIPTION_ENDPOINT = get_env("BLUER_AGENT_TRANSCRIPTION_ENDPOINT")
BLUER_AGENT_TRANSCRIPTION_MODEL_NAME = get_env("BLUER_AGENT_TRANSCRIPTION_MODEL_NAME")
BLUER_AGENT_TRANSCRIPTION_RETRIAL = get_env("BLUER_AGENT_TRANSCRIPTION_RETRIAL", 5)
BLUER_AGENT_TRANSCRIPTION_TEST_OBJECT = get_env("BLUER_AGENT_TRANSCRIPTION_TEST_OBJECT")


# Thresholds: percent of full scale. Try 1%..5%.
# how loud to begin
BLUER_AGENT_AUDIO_LISTEN_START_THRESHOLD = "2%"
# how quiet to consider silence
BLUER_AGENT_AUDIO_LISTEN_STOP_THRESHOLD = "2%"

# durations:
# need this long above threshold to start (sec)
BLUER_AGENT_AUDIO_LISTEN_START_HOLD = "0.10"
# stop after this long below threshold (sec)
BLUER_AGENT_AUDIO_LISTEN_STOP_HOLD = "1.20"
