Skip to content

Commit b15aa7d

Browse files
committed
final fixes
1 parent 9daf6b1 commit b15aa7d

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

packages/uipath_langchain_client/src/uipath_langchain_client/factory.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,10 @@ def get_chat_model(
8787
ValueError: If the model is not found in available models or vendor is not supported
8888
"""
8989
client_settings = client_settings or get_default_client_settings()
90+
9091
model_info = _get_model_info(model_name, client_settings, byo_connection_id)
91-
is_uipath_owned = model_info.get("modelSubscriptionType") == "UiPathOwned"
9292

93+
is_uipath_owned = model_info.get("modelSubscriptionType") == "UiPathOwned"
9394
if not is_uipath_owned:
9495
client_settings.validate_byo_model(model_info)
9596

src/uipath_llm_client/settings/agenthub/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,4 +139,4 @@ def get_available_models(self) -> list[dict[str, Any]]:
139139

140140
@override
141141
def validate_byo_model(self, model_info: dict[str, Any]) -> None:
142-
raise ValueError("BYOM models are not supported for AgentHub")
142+
return

src/uipath_llm_client/settings/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ def get_available_models(
143143
"""
144144
...
145145

146+
@abstractmethod
146147
def validate_byo_model(self, model_info: dict[str, Any]) -> None:
147148
"""Validate that the model is a BYOM model."""
148-
raise NotImplementedError("For BYOM models you must implement this method")
149+
...

0 commit comments

Comments
 (0)