[ python中使用文心义言 ]
发表评论
154 views
分类目录归档:Chat
注册
pip install dashscope
配置环境变量
export DASHSCOPE_API_KEY=YOUR_DASHSCOPE_API_KEY
运行
import random
from http import HTTPStatus
import dashscope
dashscope.api_key = "sk-4607ca0bb63d4646b8aeaca909091a9f"
def call_with_messages():
messages = [{&qu