huggingface: docstrings (#23148)

Added missed docstrings. Format docstrings to the consistent format
(used in the API Reference)

Co-authored-by: ccurme <chester.curme@gmail.com>
pull/22877/head^2
Leonid Ganeline 2 months ago committed by GitHub
parent 066a5a209f
commit 41f7620989
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -42,12 +42,16 @@ DEFAULT_SYSTEM_PROMPT = """You are a helpful, respectful, and honest assistant."
@dataclass
class TGI_RESPONSE:
"""Response from the TextGenInference API."""
choices: List[Any]
usage: Dict
@dataclass
class TGI_MESSAGE:
"""Message to send to the TextGenInference API."""
role: str
content: str
tool_calls: List[Dict]
@ -141,8 +145,7 @@ def _is_huggingface_pipeline(llm: Any) -> bool:
class ChatHuggingFace(BaseChatModel):
"""
Wrapper for using Hugging Face LLM's as ChatModels.
"""Hugging Face LLM's as ChatModels.
Works with `HuggingFaceTextGenInference`, `HuggingFaceEndpoint`,
`HuggingFaceHub`, and `HuggingFacePipeline` LLMs.

Loading…
Cancel
Save