03-大模型提示词工程实践(跟练)-调用智谱API实现问答 #15

Open
opened 2024-09-05 19:59:03 +08:00 by 12535224197cs · 0 comments

必备条件

  • API-keys:通过注册免费获取

  • 开发环境:通过云平台创建

1.获取API-keys

step1: 注册用户:https://open.bigmodel.cn/pricing
step2: 1.点击API密钥>2.复制API-key
截屏2024-09-04 17.03.42.png

2.开发环境创建

step1: 复制在公共算法prompts_enginnering_04,此处将复制的算法重命名为prompts4
截屏2024-09-04 14.55.05.png
step2: 选择算法(prompts04)、镜像(aihpc3-with-vscode:v0)、数据集(huggingface-cache)创建notebook
截屏2024-09-04 15.44.00.png

3.调用智谱API实现问答:

(1)运行算法中原有的call_glm4.py
截屏2024-09-04 17.40.34.png
(2)创建自己的提问call_glm4.ipynb
截屏2024-09-04 17.19.27.png

必备条件 - [x] API-keys:通过注册免费获取 - [x] 开发环境:通过云平台创建 # 1.获取API-keys step1: 注册用户:https://open.bigmodel.cn/pricing step2: 1.点击API密钥>2.复制API-key ![截屏2024-09-04 17.03.42.png](/attachments/befaccb1-1aee-42f7-a897-63f11a31e30e) # 2.开发环境创建 step1: 复制在公共算法prompts_enginnering_04,此处将复制的算法重命名为prompts4 ![截屏2024-09-04 14.55.05.png](/attachments/ea7e5fb2-e68d-4b31-8257-3e96658abc3a) step2: 选择算法(prompts04)、镜像(aihpc3-with-vscode:v0)、数据集(huggingface-cache)创建notebook ![截屏2024-09-04 15.44.00.png](/attachments/82994a2b-f0d4-40dc-a13c-7e3b761528a8) # 3.调用智谱API实现问答: (1)运行算法中原有的call_glm4.py ![截屏2024-09-04 17.40.34.png](/attachments/ecb3ad30-f46b-4e9c-9c81-2d6654fa1c0a) (2)创建自己的提问call_glm4.ipynb ![截屏2024-09-04 17.19.27.png](/attachments/4df2283c-653b-4b67-b847-796b4afe0b12)
12535224197cs changed title from 大模型提示词工程实践(跟练)-调用智谱API实现问答 #3 to 大模型提示词工程实践(跟练)-调用智谱API实现问答 2024-09-05 19:59:24 +08:00
12535224197cs changed title from 大模型提示词工程实践(跟练)-调用智谱API实现问答 to 03-大模型提示词工程实践(跟练)-调用智谱API实现问答 2024-09-28 17:05:27 +08:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: HswOAuth/llm_course#15
No description provided.