From 0a6ebd21c89c33e5e84ce650dcff4f87fa37c102 Mon Sep 17 00:00:00 2001 From: Deepak K <89829542+Deepak-Kesavan@users.noreply.github.com> Date: Fri, 30 Aug 2024 10:58:47 +0530 Subject: [PATCH] [FEATURE] Added function to get model name of LLM (#95) * Added function to get model name of LLM * Version bump * Version bump --- src/unstract/sdk/__init__.py | 2 +- src/unstract/sdk/llm.py | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/unstract/sdk/__init__.py b/src/unstract/sdk/__init__.py index 4836e1c6..14cf8252 100644 --- a/src/unstract/sdk/__init__.py +++ b/src/unstract/sdk/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.46.0" +__version__ = "0.47.0" def get_sdk_version(): diff --git a/src/unstract/sdk/llm.py b/src/unstract/sdk/llm.py index f8e903bc..d183dfa4 100644 --- a/src/unstract/sdk/llm.py +++ b/src/unstract/sdk/llm.py @@ -188,6 +188,17 @@ def get_class_name(self) -> str: """ return self._llm_instance.class_name() + def get_model_name(self) -> str: + """Gets the name of the LLM model + + Args: + NA + + Returns: + LLM model name + """ + return self._llm_instance.model + @deprecated("Use LLM instead of ToolLLM") def get_llm(self, adapter_instance_id: Optional[str] = None) -> LlamaIndexLLM: if not self._llm_instance: