Skip to content

Commit

Permalink
fix: Resolve Open Source Model Initialization in model_factory.py (#646)
Browse files Browse the repository at this point in the history
  • Loading branch information
Skevinci committed Jun 16, 2024
1 parent 53b9308 commit 99a11fa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion camel/models/model_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,9 @@ def create(
else:
raise ValueError(f"Unknown model type `{model_type}` is input")

inst = model_class(model_type, model_config_dict, api_key)
if model_type.is_open_source:
inst = model_class(model_type, model_config_dict)
else:
inst = model_class(model_type, model_config_dict, api_key)

return inst

0 comments on commit 99a11fa

Please sign in to comment.