Skip to content

Commit 8fecc06

Browse files
authored
[None][doc] add stable label to all the un-labelled arguments in LLM class (#7863)
Signed-off-by: Yan Chunwei <[email protected]>
1 parent b280c16 commit 8fecc06

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tensorrt_llm/llmapi/utils.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,9 @@ class ApiParamTagger:
564564

565565
def __call__(self, cls: Type[BaseModel]) -> None:
566566
""" The main entry point to tag the api doc. """
567-
self._process_pydantic_model(cls)
567+
if cls.__name__ in ["LlmArgs", "TorchLlmArgs"]:
568+
# TODO: apply this to other classes
569+
self._process_pydantic_model(cls)
568570

569571
def _process_pydantic_model(self, cls: Type[BaseModel]) -> None:
570572
"""Process the Pydantic model to add tags to the fields.
@@ -574,6 +576,9 @@ def _process_pydantic_model(self, cls: Type[BaseModel]) -> None:
574576
status = field_info.json_schema_extra['status']
575577
self._amend_pydantic_field_description_with_tags(
576578
cls, [field_name], status)
579+
else:
580+
self._amend_pydantic_field_description_with_tags(
581+
cls, [field_name], "stable")
577582

578583
def _amend_pydantic_field_description_with_tags(self, cls: Type[BaseModel],
579584
field_names: list[str],

0 commit comments

Comments
 (0)