}
    @property
    def lc_serializable(self) -> bool:
        return True
    baichuan_api_base: str = Field(default=DEFAULT_API_BASE)
    """Baichuan custom endpoints"""
    baichuan_api_key: Optional[SecretStr] = None
    """Baichuan API Key"""
    baichuan_secret_key: Optional[SecretStr] = None
    """Baichuan Secret Key"""
    streaming: bool = False
    """Whether to stream the results or not."""
    request_timeout: int = 60
    """request timeout for chat http requests"""
    model = "Baichuan2-53B"
    """model name of Baichuan, default is `Baichuan2-53B`."""
    temperature: float = 0.3
    """What sampling temperature to use."""
    top_k: int = 5
    """What search sampling control to use."""
    top_p: float = 0.85
    """What probability mass to use."""
    with_search_enhance: bool = False
    """Whether to use search enhance, default is False."""
    model_kwargs: Dict[str, Any] = Field(default_factory=dict)
    """Holds any model parameters valid for API call not explicitly specified."""
    class Config:
        """Configuration for this pydantic object."""
        allow_population_by_field_name = True
    @root_validator(pre=True)
    def build_extra(cls, values: Dict[str, Any]) -> Dict[str, Any]:
        """Build extra kwargs from additional params that were passed in."""
        all_required_field_names = get_pydantic_field_names(cls)
        extra = values.get("model_kwargs", {})
        for field_name in list(values):
            if field_name in extra: