🔧 chore(llms.py): add method to add extra base classes to improve extensibility
The `add_extra_base_classes` method is added to the `LLMFrontendNode` class. This method checks if the "BaseLLM" class is already present in the `base_classes` list and appends it if not. This change allows for easier extensibility by providing a way to add additional base classes to the `LLMFrontendNode` class.
This commit is contained in:
parent
8cc0497120
commit
549a8dedc5
1 changed files with 4 additions and 0 deletions
|
|
@ -21,6 +21,10 @@ class LLMFrontendNode(FrontendNode):
|
|||
if field.name == "openai_api_base":
|
||||
field.info = OPENAI_API_BASE_INFO
|
||||
|
||||
def add_extra_base_classes(self) -> None:
|
||||
if "BaseLLM" not in self.base_classes:
|
||||
self.base_classes.append("BaseLLM")
|
||||
|
||||
@staticmethod
|
||||
def format_azure_field(field: TemplateField):
|
||||
if field.name == "model_name":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue