An asynchronous command-line application that leverages the Perplexity API to generate comprehensive insights by analyzing questions and providing related follow-up questions with answers.
Features
- 🤖 Utilizes Perplexity API for intelligent question analysis
- 🔄 Asynchronous processing for efficient handling of multiple questions
- 📝 Generates related follow-up questions for deeper insights
- 💾 Saves results in both JSON and Markdown formats
- 🎨 Interactive CLI with progress animations
- 📊 Structured output with clear formatting
- 🔒 Secure API key handling through environment variables
Prerequisites
- Python 3.10+
- Perplexity API key
Usage
Basic Usage
The application will:
- Prompt you to specify if you want to log output to a file
- Ask for your question
- Request the type of expert perspective you want
- Generate and process related questions
- Display answers and save results
Output Formats
JSON Output
Results are saved in JSON format with the following structure:
{
"original_question": "user's question",
"timestamp": "YYYYMMDD_HHMMSS",
"results": [
{
"question": "question text",
"answer": "answer text"
}
]
}
Markdown Output
Results are also saved in a formatted Markdown file including:
- Timestamp
- Original question
- List of all questions and answers
- Clear section formatting
Acknowledgments
- Built with the Perplexity API
- Uses OpenAI's API client structure
- Async support through asyncio