Skip to content

Commit

Permalink
add missing llm_type based on model in hyperparameters
Browse files Browse the repository at this point in the history
  • Loading branch information
spandan_mondal committed Dec 20, 2024
1 parent e7aac7e commit ab7deae
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions kairon/shared/data/data_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,7 @@ def validate_prompt_action(bot: str, data: dict):
llm_prompts_errors = DataValidation.validate_llm_prompts(data['llm_prompts'])
data_error.extend(llm_prompts_errors)
if hyperparameters := data.get('hyperparameters'):
llm_type = data.get("llm_type")
if not llm_type:

if not data.get("llm_type"):
if model := hyperparameters.get("model"):
data["llm_type"] = DataValidation.get_model_llm_type_map().get(model)
else:
Expand Down

0 comments on commit ab7deae

Please sign in to comment.