wch / chatstream

Example Shiny for Python app which talks to the OpenAI API
https://wch.github.io/chatstream/
MIT License
74 stars 14 forks source link

doc_query just keeps asking how it can assist me? #12

Open smachlis opened 10 months ago

smachlis commented 10 months ago

I'm running the example doc_query Shiny app. I uploaded a PDF (a downloaded copy of the Framingham City Charter) to the app, and the app seemed to show that the file uploaded properly and was indexed. However, every time I ask a question, I just get "How can I assist you?" back from the app. I did export my OpenAI key. (The recipes example is working fine, though). I was hoping to mention this in an article I'm writing but want to get it working first!

[
  {
    "role": "user",
    "content": "What is the mayor's salary?"
  },
  {
    "role": "assistant",
    "content": "How can I assist you today?"
  },
  {
    "role": "user",
    "content": "What is the mayor's salary?"
  },
  {
    "role": "assistant",
    "content": "How can I assist you today?"
  },
  {
    "role": "user",
    "content": "What is a city councilor's salary?"
  },
  {
    "role": "assistant",
    "content": "How can I assist you today?"
  }
]