Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/asaniczka/SERP-RAG-Chatlorin
Starter project for creating an API endpoint that performs web searches, scrapes results, and generates answers using LLM.
https://github.com/asaniczka/SERP-RAG-Chatlorin
chromadb gemini-pro llm rag serp
Last synced: 7 days ago
JSON representation
Starter project for creating an API endpoint that performs web searches, scrapes results, and generates answers using LLM.
- Host: GitHub
- URL: https://github.com/asaniczka/SERP-RAG-Chatlorin
- Owner: asaniczka
- Created: 2024-03-16T09:24:57.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-07-07T12:33:07.000Z (4 months ago)
- Last Synced: 2024-08-02T15:26:05.561Z (3 months ago)
- Topics: chromadb, gemini-pro, llm, rag, serp
- Language: Python
- Homepage:
- Size: 328 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LLM Chat Endpoint with Internet Access
This Python project focuses on creating an API endpoint that:
1. Searches Google for information
2. Scrapes the results
3. Processes the pages for RAG
4. Uses an LLM to generate an answer
5. and returns the response.## Notes:
### Messages
- Most of the core function have been written to be LLM independent.
- The core uses `BaseMessageLog` and `BaseMessage` to pass around messages and roles.
- Only the Gemini module uses Gemini-specific formats.
- You can replace the Gemini-specific formats with OpenAI chat format and the core should still work.### Working Mode
- By default, the Dockerfile sets the app to be in low-memory mode.
- This mode will not use JavaScript rendering to load pages.
- The performance is decent, but if you wish to increase the number of pages scraped, set the `WORKING_MODE` env to anything other than `low-mem`.## How to Use
1. Clone the project repository to your local machine
2. Run `docker build -t serp_rag:latest .`
3. Launch a container with `docker run -p 8080:8000 --name serp_rag_con -e GOOGLE_GEMINI_KEY="YOUR GEMINI KEY" serp_rag:latest`
4. Load up `https://localhost:8080/docs` and try the API.