Skip to content

Commit

Permalink
allow all nvdev/ models
Browse files Browse the repository at this point in the history
  • Loading branch information
mattf committed Nov 7, 2024
1 parent b8df8fe commit 576b675
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions libs/ai-endpoints/langchain_nvidia_ai_endpoints/_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,12 @@ def __init__(self, **kwargs: Any):
"unknown and inference may fail."
)
else:
raise ValueError(
f"Model {self.mdl_name} is unknown, check `available_models`"
)
if self.mdl_name.startswith("nvdev/"): # assume valid
model = Model(id=self.mdl_name)
else:
raise ValueError(
f"Model {self.mdl_name} is unknown, check `available_models`"

Check failure on line 221 in libs/ai-endpoints/langchain_nvidia_ai_endpoints/_common.py

View workflow job for this annotation

GitHub Actions / cd libs/ai-endpoints / make lint #3.11

Ruff (E501)

langchain_nvidia_ai_endpoints/_common.py:221:89: E501 Line too long (89 > 88)
)
self.model = model
self.mdl_name = self.model.id # name may change because of aliasing
else:
Expand Down

0 comments on commit 576b675

Please sign in to comment.