fix: exit the goose and show the error message when provider environment variable is not set (#103)

This commit is contained in:
Lifei Zhou
2024-10-04 11:17:29 +10:00
committed by GitHub
parent 9e35c6370e
commit 908af7f157
26 changed files with 345 additions and 86 deletions
@@ -0,0 +1,13 @@
from exchange.invalid_choice_error import InvalidChoiceError
def test_load_invalid_choice_error():
attribute_name = "moderator"
attribute_value = "not_exist"
available_values = ["truncate", "summarizer"]
error = InvalidChoiceError(attribute_name, attribute_value, available_values)
assert error.attribute_name == attribute_name
assert error.attribute_value == attribute_value
assert error.attribute_value == attribute_value
assert error.message == "Unknown moderator: not_exist. Available moderators: truncate, summarizer"