AlBaraa63 commited on
Commit
0668b76
·
1 Parent(s): 337d169

Fix: Add examples and models directories with sample files

Browse files
.gitignore CHANGED
@@ -73,16 +73,13 @@ $RECYCLE.BIN/
73
 
74
  # Model cache (sentence transformers)
75
  .cache/
76
- models/
77
 
78
  # Hugging Face cache
79
  ~/.cache/huggingface/
80
 
81
  # Test output files
82
  test_output/
83
- *.pdf
84
- *.txt
85
- *.csv
86
  output_*.png
87
 
88
  # Temporary test files
 
73
 
74
  # Model cache (sentence transformers)
75
  .cache/
76
+ # Note: models/ folder with schemas is needed - don't ignore
77
 
78
  # Hugging Face cache
79
  ~/.cache/huggingface/
80
 
81
  # Test output files
82
  test_output/
 
 
 
83
  output_*.png
84
 
85
  # Temporary test files
examples/business_data.csv ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ month,revenue,costs,customers,employees
2
+ January,4200000,2800000,2100,42
3
+ February,4350000,2850000,2200,44
4
+ March,4500000,2900000,2300,45
5
+ April,4650000,2950000,2350,46
6
+ May,4800000,3000000,2400,47
7
+ June,4900000,3100000,2450,48
8
+ July,4950000,3050000,2480,48
9
+ August,5100000,3150000,2520,49
10
+ September,5200000,3200000,2550,49
11
+ October,5300000,3250000,2600,50
12
+ November,5400000,3300000,2650,50
13
+ December,5500000,3400000,2700,50
examples/sample_documents.txt ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sample Test Documents for RAG Search
2
+
3
+ ## Document 1: Artificial Intelligence Overview
4
+
5
+ Artificial intelligence (AI) represents one of the most transformative technologies of our time. Machine learning, a subset of AI, enables computers to learn from data without explicit programming. Deep learning takes this further by using neural networks with multiple layers to process complex patterns.
6
+
7
+ AI applications span numerous industries including healthcare, finance, transportation, and entertainment. Natural language processing allows machines to understand and generate human language, while computer vision enables image and video analysis.
8
+
9
+ ## Document 2: Climate Change and Sustainability
10
+
11
+ Climate change poses one of the greatest challenges facing humanity. Rising global temperatures, extreme weather events, and sea level rise threaten ecosystems and human societies. Sustainable practices are essential for reducing carbon emissions and protecting our planet.
12
+
13
+ Renewable energy sources like solar and wind power offer alternatives to fossil fuels. Energy efficiency improvements in buildings and transportation can significantly reduce environmental impact. Individual actions, from recycling to reducing consumption, contribute to collective climate solutions.
14
+
15
+ ## Document 3: Modern Web Development
16
+
17
+ Web development has evolved significantly with modern frameworks and technologies. React, Vue, and Angular dominate frontend development, while Node.js enables JavaScript on the backend. Progressive Web Apps blur the line between web and native applications.
18
+
19
+ Cloud platforms like AWS, Azure, and Google Cloud provide scalable infrastructure for web applications. DevOps practices automate deployment and monitoring. Security considerations, including authentication and data protection, are paramount in web development.
20
+
21
+ ## Document 4: Digital Marketing Strategies
22
+
23
+ Digital marketing encompasses SEO, content marketing, social media, and paid advertising. Understanding your target audience is crucial for effective campaigns. Analytics tools provide insights into user behavior and campaign performance.
24
+
25
+ Content marketing focuses on creating valuable content to attract and engage audiences. Social media platforms offer direct communication channels with customers. Email marketing remains one of the highest ROI channels for businesses.
26
+
27
+ ## Document 5: Financial Technology Innovation
28
+
29
+ Fintech is revolutionizing financial services through technology. Mobile payments, cryptocurrency, and blockchain are transforming how we transact. Robo-advisors use algorithms to provide investment advice at lower costs than traditional advisors.
30
+
31
+ Open banking APIs enable third-party developers to build financial applications. Peer-to-peer lending platforms connect borrowers directly with lenders. Regulatory technology helps firms comply with complex financial regulations.
examples/sample_email_complaint.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Subject: Issue with Order #45678
2
+ From: customer@example.com
3
+ Date: January 15, 2025
4
+
5
+ Hello,
6
+
7
+ I placed order #45678 on January 10th, but it still hasn't arrived. The tracking shows it's been stuck at the distribution center for 3 days now. This is extremely frustrating as I needed these items for an important event this weekend.
8
+
9
+ Can you please look into this urgently and let me know when I can expect delivery? If it won't arrive by Friday, I'll need to cancel the order and get a refund.
10
+
11
+ This isn't the first time I've had delivery issues with your company.
12
+
13
+ Thanks,
14
+ Jane Smith
examples/sample_email_inquiry.txt ADDED
@@ -0,0 +1,21 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Subject: Product Inquiry - Enterprise Plan
2
+ From: john.doe@bigcorp.com
3
+ Date: January 15, 2025
4
+
5
+ Hello,
6
+
7
+ I'm reaching out on behalf of BigCorp Inc. We're currently evaluating automation solutions for our enterprise operations and came across your platform.
8
+
9
+ Could you provide more information about:
10
+ 1. Enterprise pricing plans
11
+ 2. Available features for teams of 500+ users
12
+ 3. API integration capabilities
13
+ 4. Security and compliance certifications
14
+ 5. Implementation timeline
15
+
16
+ We're looking to make a decision by the end of Q1. Would it be possible to schedule a demo call next week?
17
+
18
+ Best regards,
19
+ John Doe
20
+ Director of IT Operations
21
+ BigCorp Inc.
examples/sample_email_urgent.txt ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Subject: URGENT - System Outage
2
+ From: ops.team@company.com
3
+ Date: January 15, 2025
4
+
5
+ URGENT: Production system is down!
6
+
7
+ Our main application server crashed at 2:30 PM EST. All customer-facing services are currently unavailable. Error logs show database connection timeout errors.
8
+
9
+ Impact:
10
+ - 5,000+ active users affected
11
+ - Revenue loss: ~$10K per hour
12
+ - Customer support receiving high volume of complaints
13
+
14
+ Actions taken so far:
15
+ - Restarted application servers (no success)
16
+ - Database team investigating
17
+ - Switched to emergency maintenance page
18
+
19
+ NEED IMMEDIATE ATTENTION from DevOps and Database teams!
20
+
21
+ Updates being posted to #incident-response Slack channel.
22
+
23
+ - Operations Team
examples/sample_report.txt ADDED
@@ -0,0 +1,42 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Sample Business Report
2
+
3
+ ## Q4 2024 Performance Summary
4
+
5
+ **Executive Summary:**
6
+ Our company achieved outstanding performance in Q4 2024, with revenue reaching $5,000,000, representing a 19% increase compared to the previous quarter. This growth was driven by strong customer acquisition and improved operational efficiency.
7
+
8
+ ### Key Highlights:
9
+ - **Revenue Growth:** 19% quarter-over-quarter increase
10
+ - **Customer Base:** Expanded to 2,500 active customers
11
+ - **Profit Margin:** Maintained at 40%, indicating strong cost management
12
+ - **Team Expansion:** Grew from 42 to 50 employees
13
+
14
+ ### Financial Metrics:
15
+ The company generated $5M in revenue against $3M in costs, resulting in a healthy $2M profit. Revenue per employee stands at $100,000, demonstrating excellent productivity levels.
16
+
17
+ ### Market Position:
18
+ We've successfully penetrated three new market segments, with enterprise clients now representing 35% of our customer base. Customer satisfaction scores remain high at 4.6/5.0.
19
+
20
+ ### Looking Forward:
21
+ Based on current trends, we project 25% revenue growth for Q1 2025. Key initiatives include expanding our sales team, launching two new product features, and entering the European market.
22
+
23
+ ### Operational Efficiency:
24
+ - Customer acquisition cost: $800
25
+ - Lifetime value: $5,000
26
+ - Churn rate: 3.2% (industry average: 5%)
27
+ - Support response time: Under 2 hours
28
+
29
+ ### Technology Investments:
30
+ We've invested $500K in infrastructure improvements, including AI-powered customer service tools and automated reporting systems. These investments are expected to reduce operational costs by 15% in 2025.
31
+
32
+ ### Challenges and Mitigation:
33
+ While we faced increased competition in Q4, our unique value proposition and superior customer service allowed us to maintain market share. We're addressing scaling challenges through process automation and strategic hiring.
34
+
35
+ ### Conclusion:
36
+ Q4 2024 demonstrated strong business fundamentals and positioned us well for continued growth. Our focus on customer success, operational excellence, and strategic innovation will drive performance in 2025.
37
+
38
+ ---
39
+
40
+ *This report was generated on January 15, 2025*
41
+ *Prepared by: Finance Department*
42
+ *Confidential - Internal Use Only*
models/__init__.py ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ """
2
+ MissionControlMCP Models Package
3
+ """
models/schemas.py ADDED
@@ -0,0 +1,109 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """
2
+ Pydantic schemas for tool inputs and outputs
3
+ """
4
+ from pydantic import BaseModel, Field
5
+ from typing import Optional, List, Dict, Any
6
+
7
+
8
+ class PdfReaderInput(BaseModel):
9
+ """Input schema for PDF reader tool"""
10
+ file_path: str = Field(description="Path to the PDF file to read")
11
+
12
+
13
+ class PdfReaderOutput(BaseModel):
14
+ """Output schema for PDF reader tool"""
15
+ text: str = Field(description="Extracted text from PDF")
16
+ pages: int = Field(description="Number of pages in PDF")
17
+ metadata: Dict[str, Any] = Field(description="PDF metadata")
18
+
19
+
20
+ class TextExtractorInput(BaseModel):
21
+ """Input schema for text extractor tool"""
22
+ text: str = Field(description="Raw text to process")
23
+ operation: str = Field(description="Operation: 'clean', 'summarize', or 'chunk'", default="clean")
24
+ max_length: Optional[int] = Field(description="Max length for summary", default=500)
25
+
26
+
27
+ class TextExtractorOutput(BaseModel):
28
+ """Output schema for text extractor tool"""
29
+ result: str = Field(description="Processed text")
30
+ word_count: int = Field(description="Word count of result")
31
+
32
+
33
+ class WebFetcherInput(BaseModel):
34
+ """Input schema for web fetcher tool"""
35
+ url: str = Field(description="URL to fetch")
36
+ extract_text_only: bool = Field(description="Extract only text content", default=True)
37
+
38
+
39
+ class WebFetcherOutput(BaseModel):
40
+ """Output schema for web fetcher tool"""
41
+ content: str = Field(description="Fetched content")
42
+ status_code: int = Field(description="HTTP status code")
43
+ metadata: Dict[str, Any] = Field(description="Response metadata")
44
+
45
+
46
+ class RagSearchInput(BaseModel):
47
+ """Input schema for RAG search tool"""
48
+ query: str = Field(description="Search query")
49
+ documents: List[str] = Field(description="List of documents to search in")
50
+ top_k: int = Field(description="Number of top results to return", default=3)
51
+
52
+
53
+ class RagSearchOutput(BaseModel):
54
+ """Output schema for RAG search tool"""
55
+ results: List[Dict[str, Any]] = Field(description="Search results with scores")
56
+
57
+
58
+ class DataVisualizerInput(BaseModel):
59
+ """Input schema for data visualizer tool"""
60
+ data: str = Field(description="JSON or CSV string data")
61
+ chart_type: str = Field(description="Chart type: 'bar', 'line', 'pie', 'scatter'", default="bar")
62
+ x_column: Optional[str] = Field(description="X-axis column name", default=None)
63
+ y_column: Optional[str] = Field(description="Y-axis column name", default=None)
64
+ title: Optional[str] = Field(description="Chart title", default="Data Visualization")
65
+
66
+
67
+ class DataVisualizerOutput(BaseModel):
68
+ """Output schema for data visualizer tool"""
69
+ image_base64: str = Field(description="Base64 encoded chart image")
70
+ dimensions: Dict[str, int] = Field(description="Image dimensions")
71
+
72
+
73
+ class FileConverterInput(BaseModel):
74
+ """Input schema for file converter tool"""
75
+ input_path: str = Field(description="Path to input file")
76
+ output_format: str = Field(description="Output format: 'txt', 'csv', 'pdf'")
77
+ output_path: Optional[str] = Field(description="Path for output file", default=None)
78
+
79
+
80
+ class FileConverterOutput(BaseModel):
81
+ """Output schema for file converter tool"""
82
+ output_path: str = Field(description="Path to converted file")
83
+ success: bool = Field(description="Conversion success status")
84
+ message: str = Field(description="Status message")
85
+
86
+
87
+ class EmailIntentInput(BaseModel):
88
+ """Input schema for email intent classifier tool"""
89
+ email_text: str = Field(description="Email text to classify")
90
+
91
+
92
+ class EmailIntentOutput(BaseModel):
93
+ """Output schema for email intent classifier tool"""
94
+ intent: str = Field(description="Classified intent category")
95
+ confidence: float = Field(description="Confidence score (0-1)")
96
+ secondary_intents: List[Dict[str, float]] = Field(description="Other possible intents")
97
+
98
+
99
+ class KpiGeneratorInput(BaseModel):
100
+ """Input schema for KPI generator tool"""
101
+ data: str = Field(description="JSON string with business data")
102
+ metrics: List[str] = Field(description="List of metrics to calculate", default=["revenue", "growth", "efficiency"])
103
+
104
+
105
+ class KpiGeneratorOutput(BaseModel):
106
+ """Output schema for KPI generator tool"""
107
+ kpis: Dict[str, Any] = Field(description="Calculated KPIs")
108
+ summary: str = Field(description="Executive summary")
109
+ trends: List[str] = Field(description="Key trends identified")
requirements.txt ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # MissionControlMCP Requirements
2
+ # Python 3.11+ required
3
+
4
+ # MCP SDK
5
+ mcp>=1.0.0
6
+
7
+ # Document Processing
8
+ pypdf2>=3.0.0
9
+ python-docx>=1.0.0
10
+
11
+ # Web Scraping
12
+ requests>=2.31.0
13
+ beautifulsoup4>=4.12.0
14
+
15
+ # Data Processing
16
+ pandas>=2.0.0
17
+ numpy>=1.24.0
18
+
19
+ # Vector Store & Embeddings
20
+ faiss-cpu>=1.7.4
21
+ sentence-transformers>=2.2.0
22
+
23
+ # Visualization
24
+ matplotlib>=3.7.0
25
+ seaborn>=0.12.0
26
+ pillow>=10.0.0
27
+
28
+ # Web Interface (Gradio for hackathon demo)
29
+ gradio>=5.48.0
30
+
31
+ # NLP & Text Processing
32
+ nltk>=3.8.0
33
+ scikit-learn>=1.3.0
34
+
35
+ # Utilities
36
+ python-dateutil>=2.8.0
37
+ pydantic>=2.0.0