From 67b1eabb249b72f99f1fc53b76918478ee3b6f7b Mon Sep 17 00:00:00 2001 From: Matthew Farrellee Date: Fri, 18 Oct 2024 10:20:08 -0400 Subject: [PATCH] use class name as string to assist subclassing --- libs/ai-endpoints/langchain_nvidia_ai_endpoints/chat_models.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/chat_models.py b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/chat_models.py index 63ee21c5..06ddca92 100644 --- a/libs/ai-endpoints/langchain_nvidia_ai_endpoints/chat_models.py +++ b/libs/ai-endpoints/langchain_nvidia_ai_endpoints/chat_models.py @@ -313,7 +313,8 @@ def __init__(self, **kwargs: Any): default_hosted_model_name=_DEFAULT_MODEL_NAME, **({"api_key": api_key} if api_key else {}), # only pass if set infer_path="{base_url}/chat/completions", - cls=self.__class__.__name__, + # instead of self.__class__.__name__ to assist in subclassing ChatNVIDIA + cls="ChatNVIDIA", ) # todo: only store the model in one place # the model may be updated to a newer name during initialization