tools / utils /upload /download.py
Adinosaur's picture
Upload folder using huggingface_hub
1c980b1 verified
raw
history blame contribute delete
294 Bytes
import os
from openai import OpenAI
client = OpenAI(
api_key=os.getenv("DASHSCOPE_API_KEY"),
base_url="https://dashscope.aliyuncs.com/compatible-mode/v1",
)
content = client.files.content(file_id="file-batch_output-xxx")
# 打印结果文件内容
content.write_to_file("result.jsonl")