Giter Club home page Giter Club logo

doc-qa-tutorial's Introduction

Hi, I'm Sasmitha. I build cool AI tools.

πŸ’» Programming Languages

  • Python
  • TS/JS

πŸ›  Frameworks

  • React
  • FastAPI
  • Tailwind
  • LangChain
  • Supabase
  • XState

Want to build and ship your MVP fastπŸš€ Reach me at [email protected]

doc-qa-tutorial's People

Contributors

mmz-001 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

doc-qa-tutorial's Issues

Often got errors when loading a PDF or asking questions

Hi Sasmitha,

First good work! I am very impressed! I came up the similar idea and then I found your code. Later on I found chatpdf.com. They are taking the idea to a fine product. I have tried both your code and chatpdf. Their code is quite stable. They also have some new features, for example, after loading the PDF, it has GPT to come up three questions.

The problem that I had with your code is that it often comes up some errors: sometime at the time to load the PDF, sometime when asking questions. I tried the same file in chatpdf, they have no problem. Here is an example: I have attached the PDF file and you will see the following error message when you load it. I hope you can figure out what is the problem and fix it.

Thanks!

Leo


Share

ChatDoc - The AI Bot Answering Your Questions based on a Document
Upload a PDF file, then you can ask questions, our ChatGPT will answer questions based on the document

Drag and drop file here
Limit 200MB per file β€’ PDF
Browse files
Chris_Mack_PhD_Thesis.pdf
0.7MB

openai.error.RateLimitError: This app has encountered an error. The original error message is redacted to prevent data leaks. Full error details have been recorded in the logs (if you're on Streamlit Cloud, click on 'Manage app' in the lower right of your app).
Traceback:
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 565, in _run_script
exec(code, module.dict)
File "/app/chatdoc/app.py", line 18, in
index = embed_text(parse_pdf(uploaded_file))
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 627, in wrapped_func
return get_or_create_cached_value()
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/legacy_caching/caching.py", line 611, in get_or_create_cached_value
return_value = non_optional_func(*args, **kwargs)
File "/app/chatdoc/utils.py", line 32, in embed_text
index = FAISS.from_texts(texts, embeddings)
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/vectorstores/faiss.py", line 193, in from_texts
embeddings = embedding.embed_documents(texts)
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 87, in embed_documents
responses = [
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 88, in
self._embedding_func(text, engine=self.document_model_name)
File "/home/appuser/venv/lib/python3.9/site-packages/langchain/embeddings/openai.py", line 76, in _embedding_func
return self.client.create(input=[text], engine=engine)["data"][0]["embedding"]
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/embedding.py", line 33, in create
response = super().create(*args, **kwargs)
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_resources/abstract/engine_api_resource.py", line 153, in create
response, _, api_key = requestor.request(
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 226, in request
resp, got_stream = self._interpret_response(result, stream)
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 619, in _interpret_response
self._interpret_response_line(
File "/home/appuser/venv/lib/python3.9/site-packages/openai/api_requestor.py", line 679, in _interpret_response_line
raise self.handle_error_response(
Chris_Mack_PhD_Thesis.pdf

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.