langchain-ai / langchain-nvidia

MIT License
48 stars 15 forks source link

Client rejects incompatible models #81

Closed raspawar closed 1 month ago

raspawar commented 1 month ago

As a user of the connectors, I can select from many modals and want to be alerted early if a model is not compatible with my use case.

Example test, w/ public_class of ChatNVIDIA, NVIDIAEmbeddings, NVIDIARerank for LangChain -

{{ invalid = select known model that does not work with public_class, e.g. NV-Embed-QA and ChatNVIDIA with pytest.raises(ValueError) as e: public_class(model=invalid, nvidia_api_key="a-bogus-key") assert "not compatible" in str(e.value) }}

@sumitkbh