| from search_call import search_duckduckgo | |
| from cleaner import clean_results | |
| from summarizer import summarize | |
| from reasoning import explain | |
| # Fake model placeholder (NEO-2.0 will go here) | |
| class NeoModel: | |
| def generate(self, prompt:str) -> str: | |
| return f"[NEO OUTPUT]\n{prompt}" | |
| neo = NeoModel() | |
| def neo_pipeline(query:str) -> str: | |
| # Step 1: Search | |
| search_results = search_duckduckgo(query) | |
| # Step 2: Clean results | |
| cleaned_results = clean_results(search_results) | |
| # Step 3: Context | |
| context = "\n".join( | |
| return "\n".join(f"{r["title"]}: {r["text"]}" for r in cleaned | |
| ) | |
| # Step 4: Summarize | |
| summary = summarize(neo, context) | |
| # Step 5: Reasoning | |
| final = explain(neo, summary) | |
| return final | |
| if __name__ == "__main__": | |
| while True: | |
| user_query = input("Enter your question (or 'exit' to quit): ") | |
| if user_query.lower() == "exit": | |
| break | |
| answer = neo_pipeline(user_query) | |
| print(f"Answer:\n{answer}\n") |