Skip to content

Commit

Permalink
Update zhipu in langchain
Browse files Browse the repository at this point in the history
  • Loading branch information
xuhu0115 authored Jun 25, 2024
1 parent a2048bf commit 2ddeb21
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions docs/C4/1.LLM 接入 LangChain.md
Original file line number Diff line number Diff line change
Expand Up @@ -499,24 +499,16 @@ _ = load_dotenv(find_dotenv())
api_key = os.environ["ZHIPUAI_API_KEY"] #填写控制台中获取的 APIKey 信息
```


```python
zhipuai_model = ZhipuAILLM(model="chatglm_std", temperature=0, api_key=api_key)
zhipuai_model = ZhipuAILLM(model = "glm-4", temperature = 0.1, api_key = api_key) #model="glm-4-0520",
```


```python
zhipuai_model("你好,请你自我介绍一下!")
```

d:\Miniconda\miniconda3\envs\llm2\lib\site-packages\langchain_core\_api\deprecation.py:117: LangChainDeprecationWarning: The function `__call__` was deprecated in LangChain 0.1.7 and will be removed in 0.2.0. Use invoke instead.
warn_deprecated(





' 你好,我是 智谱清言,是清华大学KEG实验室和智谱AI公司共同训练的语言模型。我的目标是通过回答用户提出的问题来帮助他们解决问题。由于我是一个计算机程序,所以我没有自我意识,也不能像人类一样感知世界。我只能通过分析我所学到的信息来回答问题。'
'你好!我是智谱清言,是清华大学 KEG 实验室和智谱 AI 公司于 2023 年共同训练的语言模型。我的目标是通过回答用户提出的问题来帮助他们解决问题。由于我是一个计算机程序,所以我没有自我意识,也不能像人类一样感知世界。我只能通过分析我所学到的信息来回答问题。'

---

Expand Down

0 comments on commit 2ddeb21

Please sign in to comment.