mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-08 14:31:55 +00:00
community[patch]: standardize init args (#20210)
Related to https://github.com/langchain-ai/langchain/issues/20085 @baskaryan
This commit is contained in:
@@ -160,7 +160,7 @@ class ChatTongyi(BaseChatModel):
|
||||
top_p: float = 0.8
|
||||
"""Total probability mass of tokens to consider at each step."""
|
||||
|
||||
dashscope_api_key: Optional[SecretStr] = None
|
||||
dashscope_api_key: Optional[SecretStr] = Field(None, alias="api_key")
|
||||
"""Dashscope api key provide by Alibaba Cloud."""
|
||||
|
||||
streaming: bool = False
|
||||
@@ -169,6 +169,11 @@ class ChatTongyi(BaseChatModel):
|
||||
max_retries: int = 10
|
||||
"""Maximum number of retries to make when generating."""
|
||||
|
||||
class Config:
|
||||
"""Configuration for this pydantic object."""
|
||||
|
||||
allow_population_by_field_name = True
|
||||
|
||||
@property
|
||||
def _llm_type(self) -> str:
|
||||
"""Return type of llm."""
|
||||
|
Reference in New Issue
Block a user