Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

api文件管理文件上传接口返回错误码500 #386

Open
kunkun8866 opened this issue Mar 7, 2024 · 0 comments
Open

api文件管理文件上传接口返回错误码500 #386

kunkun8866 opened this issue Mar 7, 2024 · 0 comments

Comments

@kunkun8866
Copy link

您好!我在调用文件上传接口时候一直返回
"status":500,"error":"Internal Server Error","path":"/v1/files"
在稍等片刻重新发出请求时候仍然出现同样的问题,想咨询一下是否是接口或服务器问题?
希望能尽快收到您的回复,谢谢!
这是我的代码:
url = "https://api.baichuan-ai.com/v1/files"
headers = {'Authorization': 'Bearer APIKEY',"Content-Type": "multipart/form-data"}
files={
'file': open("SPA按摩商业计划书.docx", 'rb'),
'purpose':'knowledge-base',
}
response = requests.post(url,headers=headers,files=files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant