[Doc] Improve api doc (#29324)

- Fix doc description
- Add static method decorator
This commit is contained in:
ZhangShenao 2025-01-21 22:16:08 +08:00 committed by GitHub
parent 7b44c3384e
commit 33e22ccb19
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -636,7 +636,7 @@ class ChatAnthropic(BaseChatModel):
def _get_ls_params(
self, stop: Optional[List[str]] = None, **kwargs: Any
) -> LangSmithParams:
"""Get the parameters used to invoke the model."""
"""Get standard params for tracing."""
params = self._get_invocation_params(stop=stop, **kwargs)
ls_params = LangSmithParams(
ls_provider="anthropic",

View File

@ -32,7 +32,8 @@ documents/chunks)"""
class DummyTokenizer:
"""Dummy tokenizer for when tokenizer cannot be accessed (e.g., via Huggingface)"""
def encode_batch(self, texts: List[str]) -> List[List[str]]:
@staticmethod
def encode_batch(texts: List[str]) -> List[List[str]]:
return [list(text) for text in texts]