Closed ai-yann closed 3 weeks ago
Describe the improvement
Add support for PDF files in the documents parameter, allowing users to provide PDFs directly.
Code snippet of expected outcome
import cohere co = cohere.ClientV2("<<apiKey>>") response = co.chat( model="command-r-plus", documents=[{'id': '1', 'data': {'path': '/path/to/document.pdf'}}], messages=[ { "role": "user", "content": "What is this document about?" } ] ) print(response)
Here is how much code I currently have to write to get the above going: chat_with_pdf.zip
Hey @ai-yann thanks for suggestion, we won't be implementing this right now because PDF would introduce a lot of complexity with parsing etc. we would currently expect the client to manage this complexity.
Describe the improvement
Add support for PDF files in the documents parameter, allowing users to provide PDFs directly.
Code snippet of expected outcome
Here is how much code I currently have to write to get the above going: chat_with_pdf.zip