🐘GLM4接入langchain使用(API)
type
status
date
slug
summary
tags
category
icon
password
中文最强LLM GLM4接入langchain使用教程。注意GLM4支持Agent调用。
相关依赖包安装:
引入相关依赖包
首先需要注册智普的开发者账号:
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F53097e0d-0b90-4e6f-8c6b-df7ab04ab352%2Fc0c95fe9-aa7e-4e17-95c3-383f9a0de773%2FUntitled.png?table=block&id=1c52ae7b-0da8-4b19-8835-1b8a30101388&t=1c52ae7b-0da8-4b19-8835-1b8a30101388&width=875&cache=v2)
网站引导还是比较清晰的,好评。现在注册送2500万的token,而且还有99元购买1000万token的活动!
输入你申请到的api key。
直接使用最新的glm-4模型:
基础使用
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F53097e0d-0b90-4e6f-8c6b-df7ab04ab352%2F12a49734-d03f-4fb0-bc62-1dec27dd3ac4%2FUntitled.png?table=block&id=974cdea2-814f-4a6d-a1bd-e0a01a1a12f3&t=974cdea2-814f-4a6d-a1bd-e0a01a1a12f3&width=1056&cache=v2)
点击运行:
高级使用(流式输出)
高级使用(Agent调用)
点击查看运行:
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F53097e0d-0b90-4e6f-8c6b-df7ab04ab352%2F42417119-dfd2-44d1-95d1-01b8ee99264d%2FUntitled.png?table=block&id=e8c0725e-6fe8-46c4-b56c-c142a4816515&t=e8c0725e-6fe8-46c4-b56c-c142a4816515&width=1548&cache=v2)
整体而言GLM4的能力还是比较强的,尤其在中文领域,更多的信息可以参考:
Loading...