Closed mattf closed 3 months ago
To simplify and align switching from hosted and local backends, the mode() method is deprecated in favor of using base_url passed to constructors.
mode()
base_url
The mode() method will be removed in v0.1.
Old usage -
from langchain_nvidia_ai_endpoints import ChatNVIDIA, NVIDIAEmbeddings, NVIDIARerank llm = ChatNVIDIA().mode("nim", base_url="http://localhost:8000/v1") embedder = NVIDIAEmbeddings().mode("nim", base_url="http://localhost:12345/v1") ranker = NVIDIARerank().mode("nim", base_url="http://localhost:1976/v1")
New usage -
from langchain_nvidia_ai_endpoints import ChatNVIDIA, NVIDIAEmbeddings, NVIDIARerank llm = ChatNVIDIA(base_url="http://localhost:8000/v1") embedder = NVIDIAEmbeddings(base_url="http://localhost:12345/v1") ranker = NVIDIARerank(base_url="http://localhost:1976/v1")
A full documentation refresh will follow. I want to get the deprecation warnings to users ASAP.
Description
To simplify and align switching from hosted and local backends, the
mode()
method is deprecated in favor of usingbase_url
passed to constructors.The
mode()
method will be removed in v0.1.Old usage -
New usage -
A full documentation refresh will follow. I want to get the deprecation warnings to users ASAP.