Claude-API icon indicating copy to clipboard operation
Claude-API copied to clipboard

upload_attachment response:{"error": {"type": "permission_error", "message": "We are unable to serve your request"}}

Open roaringmyshallowwater opened this issue 7 months ago • 2 comments

    def upload_attachment(self, file_path):
      # ....
      response = req.post(url, headers=headers, proxies=self.proxies, files=files)
        print(response.content)
        if response.status_code == 200:
            return response.json()
        else:
            return False

It seems that because 'curl_cffi' does not support uploading files, we have to use 'requests' to upload files. However, this seems to result in an error:

b'{"error": {"type": "permission_error", "message": "We are unable to serve your request"}}'
Chatbot: {'Error: Invalid file format. Please try again.'}

roaringmyshallowwater avatar Nov 21 '23 08:11 roaringmyshallowwater