langchain-ai / langchain-nvidia

MIT License
48 stars 15 forks source link

make connectors use user provided base_url when the provided model is also hosted #49

Closed mattf closed 3 months ago

mattf commented 3 months ago

previously, if a model was known to be hosted on a custom endpoint and a user ran the same model locally, the connectors would favor the hosted version. for instance, NVIDIAEmbeddings(model="NV-Embed-QA", base_url="http://localhost/v1") would contact the hosted NV-Embed-QA. likewise, ChatNVIDIA(model="mistralai/mixtral-8x7b-instruct-v0.1", base_url="http://localhost/v1") would contact the hosted mistralai/mixtral-8x7b-instruct-v0.1.

fixes #31