Giter Site home page Giter Site logo

claude-web's People

Contributors

haibersut avatar

Watchers

 avatar

claude-web's Issues

TODO: 修复文件转文字请求错误

请求内容:

POST https://claude.ai/api/convert_document HTTP/1.1
'Host': 'claude.ai'
Connection: keep-alive
Content-Length: xxxxxxxxx
sec-ch-ua: xxxxxx
sec-ch-ua-platform: "Windows"
sec-ch-ua-mobile: ?0
User-Agent: xxxxxxx
'Content-Type: multipart/form-data'; boundary=----xxxxx
'Accept': '/',
'Origin': 'https://claude.ai',
Sec-Fetch-Site: same-origin
Sec-Fetch-Mode: cors
Sec-Fetch-Dest: empty
'Referer': 'https://claude.ai/chats',
'Accept-Encoding': 'gzip, deflate, br',
Accept-Language: xxxxxxx
Cookie: sessionKey=xxxx

------xxxxxx
Content-Disposition: form-data; name="file"; filename="test.pdf"
Content-Type: application/pdf

(下面是PDF的内容)


响应内容:

HTTP/1.1 200 OK
Date: xxxxxxx
Content-Type: application/json
Connection: keep-alive
strict-transport-security: max-age=xxxx; includeSubDomains; preload
x-xss-protection: 1; mode=block
x-frame-options: xxxx
x-content-type-options: nosniff
content-security-policy: xxxxxxx
vary: RSC, Next-Router-State-Tree, Next-Router-Prefetch, Accept-Encoding
Cache-Control: private
Via: 1.1 google
CF-Cache-Status: DYNAMIC
Set-Cookie: xxxxxxxxx
Server: cloudflare
CF-RAY: xxxxxx
Content-Length: xxxxxx

{"file_name":"test.pdf","file_size":xxxxx,"file_type":"pdf","extracted_content":"PDF文件中的文字内容.","totalPages":xxxxx}

其实可以自行解析构造即可,返回的内容会被加入到"attachments": []中,然后跟随文本一起请求。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.