Romeo GPT is an AI assistant designed to provide a suite of services which range from document management and analysis to multifaceted AI powered query endpoints. Leveraging FastAPI, Redisearch, and OpenAI's GPT-4, Romeo offers an efficient, powerful, and secure platform for diverse tasks such as document processing, vector-related object management, content analysis, and dynamic search queries.
To run this project, you need to have Docker and Docker Compose installed on your machine. If you don't have them already, please follow the installation guides below:
- Docker installed on your system
- Python 3.10 or later installed on your system
- Basic understanding of FastAPI and Redis.
Create a .env file in the same directory as the docker-compose.yml file with the following variables:
OPENAI_API_KEY=<your_openai_api_key>
REDIS_HOST=<your_redis_host>
REDIS_PORT=<your_redis_port>
REDIS_PASSWORD=<your_redis_password>
GOOGLE_API_KEY=<your_google_api_key>
GOOGLE_CSE_ID=<your_google_cse_id>
-
First, you need to set up the proper API keys. To do this, create the GOOGLE_API_KEY in the Google Cloud Credential console. You can access the console from this link: Google Cloud Console
-
Then, create a GOOGLE_CSE_ID using the Programmable Search Engine. You can do this by visiting this link: Programmable Search Engine
-
After creating these keys, add them to the .env file.
-
Navigate to the project directory containing the docker-compose.yml file.
-
Run the following command to deploy the application:
docker-compose up --build
This command will build the Docker images and start the containers.
The application will be available at:
- FastAPI Server: http://localhost:8000
- Redis Browser: http://localhost:8001/redis-stack/browser
To test the application, you can use the FastAPI autogenerated documentation by visiting http://localhost:8000/docs. This will provide you with an interactive interface to upload documents and ask questions about the content.
- Go to the /upload-files/ endpoint and upload your documents. The supported file formats are PDF, DOCX, and TXT.
- Use the /create-task/ endpoint to ask a question about the uploaded documents. The AI assistant will analyze the most relevant document and provide an answer based on its content.
Romeo GPT also includes a custom Google Search endpoint at /api/google-search/. This endpoint leverages the power of GPT-4 to conduct informed Google searches based on the provided tasks. This adds another layer of intelligence to your queries, making them more precise and effective.
Mozilla Public License Version 2.0