Skip to content

Commit aa375ca

Browse files
committed
first draft
1 parent 756e33b commit aa375ca

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Research Finder CLI
2+
3+
A tool to research topics using Perplexity Sonar API.
4+
5+
*More details to come.*
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
#!/usr/bin/env python3
2+
"""
3+
Research Finder CLI - Initial Skeleton
4+
"""
5+
6+
import argparse
7+
import sys
8+
+import os
9+
+from pathlib import Path
10+
+from typing import Optional, Dict, Any # Added imports
11+
12+
def research_topic(query: str, model: str):
13+
"""Placeholder for research function."""
14+
print(f"Researching: '{query}' using model '{model}'...")
15+
# TODO: Implement API call
16+
return {"summary": "Placeholder summary", "sources": ["placeholder source"]}
17+
18+
def display_results(results: dict):
19+
"""Placeholder for displaying results."""
20+
print("\n--- Results ---")
21+
print(f"Summary: {results.get('summary')}")
22+
print(f"Sources: {results.get('sources')}")
23+
print("---------------")
24+
25+
def main():
26+
"""Main entry point."""
27+
parser = argparse.ArgumentParser(description="Research Finder CLI")
28+
parser.add_argument("query", type=str, help="The research question or topic.")
29+
parser.add_argument("-m", "--model", type=str, default="sonar-pro", help="Perplexity model to use.")
30+
# TODO: Add API key, prompt file, JSON args later
31+
32+
args = parser.parse_args()
33+
34+
print(f"Query: {args.query}", file=sys.stderr)
35+
results = research_topic(args.query, args.model)
36+
display_results(results)
37+
38+
sys.exit(0)
39+
40+
if __name__ == "__main__":
41+
main()
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
You are a helpful research assistant. Answer the user's query based on your knowledge and web search.

0 commit comments

Comments
 (0)