mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
fix(deepseek): accept base_url as alias for api_base (#35789)
Add `base_url` as a Pydantic alias for `ChatDeepSeek.api_base`, so users can pass `base_url=` when constructing the model.
This commit is contained in:
@@ -189,9 +189,13 @@ class ChatDeepSeek(BaseChatOpenAI):
|
||||
)
|
||||
"""DeepSeek API key"""
|
||||
api_base: str = Field(
|
||||
alias="base_url",
|
||||
default_factory=from_env("DEEPSEEK_API_BASE", default=DEFAULT_API_BASE),
|
||||
)
|
||||
"""DeepSeek API base URL"""
|
||||
"""DeepSeek API base URL.
|
||||
|
||||
Automatically read from env variable `DEEPSEEK_API_BASE` if not provided.
|
||||
"""
|
||||
|
||||
model_config = ConfigDict(populate_by_name=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user