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

Closed
opened 2024-09-04 18:47:15 +08:00 by 12535224197cs · 0 comments

必备条件

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

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

1.获取API-keys

step1: 注册用户:https://open.bigmodel.cn/pricing
截屏2024-09-04 17.03.35.png
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 ![截屏2024-09-04 17.03.35.png](/attachments/cc4bf1f4-5d2b-465a-a425-271efbecd3b4) step2: 1.点击API密钥>2.复制API-key ![截屏2024-09-04 17.03.42.png](/attachments/ac2b6afc-5d4f-41bd-84ce-344251959875) ## 2.开发环境创建 step1: 复制在公共算法prompts_enginnering_04,此处将复制的算法重命名为prompts4 ![截屏2024-09-04 14.55.05.png](/attachments/15b4127b-1008-410c-990d-7d60f370ef45) step2: 选择算法(prompts04)、镜像(aihpc3-with-vscode:v0)、数据集(huggingface-cache)创建notebook ![截屏2024-09-04 15.44.00.png](/attachments/695c9d2a-5432-4dc7-9c1f-dfffb4b31be2) # 3.调用智谱API实现问答: (1)运行算法中原有的call_glm4.py ![截屏2024-09-04 17.40.34.png](/attachments/9097a059-59af-492c-910c-7c608bbf7018) (2)创建自己的提问call_glm4.ipynb ![截屏2024-09-04 17.19.27.png](/attachments/c887b13e-9b7a-4cca-8e9a-f1c5ced0a41d)
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#3
No description provided.