mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-11 07:50:47 +00:00
community: Correct Input API Key Name in Notebook and Enhance Readability of Comments for ZhipuAI Chat Model (#15529)
- **Description:** This update rectifies an error in the notebook by changing the input variable from `zhipu_api_key` to `api_key`. It also includes revisions to comments to improve program readability. - **Issue:** The input variable in the notebook example should be `api_key` instead of `zhipu_api_key`. - **Dependencies:** No additional dependencies are required for this change. To ensure quality and standards, we have performed extensive linting and testing. Commands such as make format, make lint, and make test have been run from the root of the modified package to ensure compliance with LangChain's coding standards.
This commit is contained in:
@@ -35,17 +35,19 @@ class ChatZhipuAI(BaseChatModel):
|
||||
"""
|
||||
`ZHIPU AI` large language chat models API.
|
||||
|
||||
To use, you should have the ``zhipuai`` python package installed, and the
|
||||
environment variable ``ZHIPUAI_API_KEY`` set with your API key.
|
||||
|
||||
Any parameters that are valid to be passed to the zhipuai.create call can be passed
|
||||
in, even if not explicitly saved on this class.
|
||||
To use, you should have the ``zhipuai`` python package installed.
|
||||
|
||||
Example:
|
||||
.. code-block:: python
|
||||
.. code-block:: python
|
||||
|
||||
from langchain_community.chat_models import ChatZhipuAI
|
||||
|
||||
zhipuai_chat = ChatZhipuAI(
|
||||
temperature=0.5,
|
||||
api_key="your-api-key",
|
||||
model="chatglm_turbo",
|
||||
)
|
||||
|
||||
from langchain_community.chat_models import ChatZhipuAI
|
||||
zhipuai = ChatZhipuAI()
|
||||
"""
|
||||
|
||||
zhipuai: Any
|
||||
|
Reference in New Issue
Block a user