Screener Transcript Helper

dhblhhdhopbjbodknlkaajhbjefaoogf

This project is a sophisticated AI-powered tool designed to enhance the user experience on the `screener.in` website by allowing users to "chat" with financial documents. The system consists of two main components: a frontend Chrome Extension and a backend Python API deployed on the cloud. * **Integrated UI**: Injects a sleek, modern sidebar directly into the `screener.in` webpage, creating a seamless user experience. * **Automatic Document Detection**: Automatically finds the 10 most recent "Concall" transcripts on the page and populates them in a dropdown for easy selection. * **AI-Powered Chat**: Allows users to ask questions in natural language about the selected transcript and receive answers generated by the GPT-4 model. * **Suggested Questions**: Provides users with one-click suggested questions to initiate the conversation with the document. * **Cloud-Native Backend**: The API is designed to be deployed as a serverless function on Vercel for scalability and reliability. ### Frontend (Chrome Extension) The frontend is a Chrome Extension built with JavaScript that modifies the `screener.in` website. Its core logic resides in `content.js`, which is responsible for injecting the sidebar UI, finding the relevant transcripts, handling user input from the chat interface, and communicating with the backend API. While it includes files for a browser popup (`popup.html`, `popup.js`), the primary interface is the sidebar. The backend is a Python API built using the FastAPI framework. It exposes a single `/ask` endpoint that performs the following actions: 1. Receives a PDF URL and a question from the frontend. 2. Downloads the PDF content into memory. 3. Uses the `PyMuPDF` library (`fitz`) to extract text from the in-memory data. 4. Constructs a prompt containing the transcript text and the user's question. 5. Sends the prompt to the OpenAI GPT-4 model to generate a relevant answer. 6. Returns the answer to the frontend to be displayed in the chat window. The API includes CORS middleware to allow requests from the Chrome extension.

Related extensions