-
|
Hello, I am running my own local llama-server instance with a multimodal model, verified working with its simple webUI (which allows uploading images and PDFs). However the simple webUI does ask to allow to convert PDF into images, and it does. I have gptel 0.9.9.4 installed, as well as the emacs pdf-tools. In emacs, when I add a pdf file to the context and query the llm, I get the following error : Querying llama-cpp... llama-server logs the following: srv operator(): got exception: {"error":{"code":500,"message":"Invalid url format: data:application/pdf;base64","type":"server_error"}} I read that gptel converts PDFs to images and sends them to the backend as base64 encoded, however it looks here like it is sending the whole unconverted file and here is my gptel configuration: I am not sure if this is a bug due to a different setup or a misconfiguraton on my part. What am I missing here ? Any help much appreciated ! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
|
IIUC the model can only parse images, not PDFs. WebUI is converting PDFs to images before feeding it to the model. gptel is not. So you'll have to write the step of converting PDFs to images yourself. I can help integrate it into This does not seem related to #929. |
Beta Was this translation helpful? Give feedback.
alright, I got it working. This is everything I had to add to my init.el to get be able to add pdf files directly to the context: