langchain_community.chat_models.baichuan.ChatBaichuan¶
class langchain_community.chat_models.baichuan.ChatBaichuan[source]¶
Bases: BaseChatModel
Baichuan chat models API by Baichuan Intelligent Technology.
For more information, see https://platform.baichuan-ai.com/docs/api
Create a new model by parsing and validating input data from keyword arguments.
Raises ValidationError if the input data cannot be parsed to form a valid model.
param baichuan_api_base: str = 'https://api.baichuan-ai.com/v1'¶
Baichuan custom endpoints
param baichuan_api_key: Optional[pydantic.types.SecretStr] = None¶
Baichuan API Key
Constraints
type = string
writeOnly = True
format = password
param baichuan_secret_key: Optional[pydantic.types.SecretStr] = None¶
Baichuan Secret Key
Constraints
type = string
writeOnly = True
format = password
param cache: Optional[bool] = None¶
Whether to cache the response.
param callback_manager: Optional[BaseCallbackManager] = None¶
Callback manager to add to the run trace.
param callbacks: Callbacks = None¶
Callbacks to add to the run trace.
param metadata: Optional[Dict[str, Any]] = None¶
Metadata to add to the run trace.
param model = 'Baichuan2-53B'¶
model name of Baichuan, default is Baichuan2-53B.
param model_kwargs: Dict[str, Any] [Optional]¶
Holds any model parameters valid for API call not explicitly specified.
param request_timeout: int = 60¶
request timeout for chat http requests
param streaming: bool = False¶
Whether to stream the results or not.
param tags: Optional[List[str]] = None¶