ReplyGuy helps you find trending tweets and generates engaging replies to boost your engagement.
- Find trending tweets on specific topics
- Analyze viral potential using engagement metrics
- Generate engaging replies to boost your Twitter presence
- Filter tweets by verified users, engagement level, and viral potential
The application uses multiple AI APIs to ensure reliable data retrieval:
- OpenAI API - Primary source for finding trending tweets via web browsing
- Toolhouse API - Fallback mechanism when OpenAI responses are empty or have errors
We've implemented a robust fallback system:
- The system first attempts to retrieve trending tweets using OpenAI's web search capability
- If OpenAI returns empty results or encounters errors, the system automatically falls back to Toolhouse
- As a final fallback, if both APIs fail, we return mock data for demonstration purposes
- Clone this repository
https://github.com/abdibrokhim/Twitter-ReplyGuy
. - Copy
.env.example
to.env
and fill in your API keys:# OpenAI API key (primary API) OPENAI_API_KEY=your_openai_key_here # AIML API key (hosted OpenAI solution) AIML_API_KEY=your_aiml_key_here # Toolhouse API key (fallback API) TOOLHOUSE_API_KEY=your_toolhouse_key_here
- Install dependencies:
npm install
- Run the development server:
npm run dev
We use Toolhouse as a fallback mechanism when OpenAI responses fail. The integration follows these steps:
- Initialize the Toolhouse SDK with your API key
- Get the available tools from Toolhouse
- Make a request to OpenAI with the tools
- Process the response with Toolhouse's
runTools
method - Format the results for display in the UI
For more information on Toolhouse, visit https://toolhouse.ai.