This is an intelligent application that uses DuckDuckGo or Google to search for news, with a React frontend and Python backend. The application flow is as follows:
- User inputs a search topic
- AI generates optimized search queries
- The system uses DuckDuckGo or Google to search for relevant news
- AI analyzes search results and returns the most relevant content
- If no relevant results are found, the system prompts the user to narrow down the search and provides suggestions
savor/
├── backend/ # Python backend
│ ├── app.py # FastAPI application main file
│ ├── requirements.txt # Dependencies
│ └── .env.example # Environment variables example file
└── frontend/ # React frontend
├── src/ # Source code
├── public/ # Static resources
└── package.json # Dependency configuration
-
Navigate to the backend directory:
cd backend
-
Create and activate a virtual environment (optional but recommended):
python -m venv venv # Windows venv\Scripts\activate # Linux/Mac source venv/bin/activate
-
Install dependencies:
pip install -r requirements.txt
-
Create environment variables file:
# Copy example file copy .env.example .env # Edit the .env file, add your OpenAI API key, DeepSeek API key, SERPAPI API key, and search engine selection
-
Run the backend service:
python app.py
-
Navigate to the frontend directory:
cd frontend
-
Install dependencies:
yarn
-
Start the development server:
yarn dev
-
Access the application in your browser:
http://localhost:5173
- Enter the news topic you want to learn about in the search box
- Click the "Search" button or press Enter
- Wait for the AI to process and return results
- View the search results list
- If no relevant results are found, the system will provide suggestions to improve your search
- Frontend: React, TypeScript, Vite, Ant Design
- Backend: Python, fastapi, DuckDuckGo Search API, OpenAI API
- Valid OpenAI API key, DeepSeek API key, SERPAPI API key, and search engine selection are required before use
- Ensure network connectivity to access DuckDuckGo, Google, DeepSeek, and OpenAI services
- Search result quality depends on the specific content of search queries and DuckDuckGo/Google search results
- Implement backend chat history saving functionality
- Design chat history data model
- Implement API for saving chat records
- Implement API for querying historical chat records
- Add user authentication to associate chat history
- support internationalization search