Error when uploading training files

Hi, I am trying to get the file id for fine tuning, but I keep getting this error:
curl https://[my base_url]/v1/files -H “Authorization: Bearer [Key]” -F purpose=“fine-tune” -F file=“@data.jsonl

“error”:{“message”:“acreate_file() missing 2 required positional arguments: ‘file’ and ‘purpose’”,“type”:“None”,“param”:“None”,“code”:500}}

And I also used a script:

from openai import OpenAI
import os
def open_file(filepath):
with open(filepath, ‘r’, encoding=‘utf-8’) as infile:
return infile.read()
def save_file(filepath, content):
with open(filepath, ‘a’, encoding=‘utf-8’) as outfile:
outfile.write(content)
client = OpenAI(
base_url=os.environ.get(‘OPENAI_API_BASE_URL’, ‘https://[proxy…]’), # Use the base URL from the environment
api_key=os.environ.get(‘OPENAI_API_KEY’, ‘’), # Use the API key from the environment
)
response = client.files.create(
purpose=“fine-tune”,
file=open(“data.jsonl”, “rb”),

)
#file_id = response[‘id’]
print(f"File uploaded successfully with ID: {response}")


But doesnt’ work