Skip to content

Commit

Permalink
improve bedrock model error
Browse files Browse the repository at this point in the history
  • Loading branch information
AnirudhDagar committed Nov 19, 2024
1 parent ad890e8 commit b227961
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/autogluon/assistant/llm/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,9 +175,11 @@ def get_chat_model(cls, config: DictConfig) -> Union[AssistantChatOpenAI, Assist
assert config.provider in valid_providers, f"{config.provider} is not a valid provider in: {valid_providers}"

valid_models = cls.get_valid_models(config.provider)
assert (
config.model in valid_models
), f"{config.model} is not a valid model in: {valid_models} for provider {config.provider}"
assert config.model in valid_models, (
f"{config.model} is not a valid model in: {valid_models} for provider {config.provider}. "
"Please check if the requested model is available in "
f"`AWS_DEFAULT_REGION={os.environ.get('AWS_DEFAULT_REGION', 'us-west-2')}`."
)

if config.model not in WHITE_LIST_LLM:
logger.warning(f"{config.model} is not on the white list. Our white list models include {WHITE_LIST_LLM}")
Expand Down

0 comments on commit b227961

Please sign in to comment.