An open source AI engine in 100 lines of Python. Rewrite of TurboSeek (full-stack Next.js site).
- Create an account at Together AI for the LLM
- Create an account at SERP API for the search API
- Clone the repo, rename
.example.env
to.env
, and replace the API keys - Run
pip install -r requirements.txt
to install dependencies - Run
python app.py
to run the search engine
- Take in a user's question
- Make a request to the Serper API to look up the top 6 results on Google
- Scrape text from the 6 links bing sent back with BeautifulSoup
- Make a request to Mixtral-8x7B with the user's question + scraped text from the links
- Make another request to the LLM to come up with 3 related questions the user can follow up with
- Add streaming to the example
- Put it in a web server like fastAPI