bhaskatripathi / pdfGPT

PDF GPT allows you to chat with the contents of your PDF file by using GPT capabilities. The most effective open source solution to turn your pdf files in a chatbot!
https://huggingface.co/spaces/bhaskartripathi/pdfGPT_Turbo
MIT License
6.98k stars 837 forks source link

API /ask_url not working #85

Open roman-huliak opened 1 year ago

roman-huliak commented 1 year ago

Hello, i'm trying to use API from docs but its not working. Using docker image from: registry.hf.space/bhaskartripathi-pdfchatter:latest

http://localhost:7860/ask_url

response:

HTTP/1.1 404 Not Found
date: Wed, 21 Jun 2023 13:03:20 GMT
server: uvicorn
content-length: 22
content-type: application/json

{"detail":"Not Found"}

example request:

curl -X POST \
  'http://localhost:7860/ask_url' \ 
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "url": "https://example.com/files/5Z/IrggxxXB5u0hYoMfz8Cl.pdf",
  "question": "Question",
  "envs": {
    "OPENAI_API_KEY": "**-****mjtLg*****************kFJrTz3****************72U"
    }

}'

WEB UI is working correctly