Skip to content

A curated collection of practical AI projects implementing OCR systems, RAG, AI agents, and other AI use cases.

fix(competitive_intelligence_agent): remove unresolved merge conflict markers

Rudy Celeklib2e7249f6c57
diff --git a/ai_agents/competitive_intelligence_agent/.env.example b/ai_agents/competitive_intelligence_agent/.env.example
index 0d6e633..3ddf94a 100644
--- a/ai_agents/competitive_intelligence_agent/.env.example
+++ b/ai_agents/competitive_intelligence_agent/.env.example
@@ -1,8 +1,4 @@
-<<<<<<< HEAD
-GEMINI_API_KEY=your_gemini_api_key_here
-=======
# Google AI Studio API key used to access Gemma 4 via the Gemini API. Get yours free at https://aistudio.google.com
GEMINI_API_KEY=your_gemini_api_key_here
# Tavily Search API key used for real-time web research by the CrewAI agents. Get yours free at https://tavily.com
->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a
TAVILY_API_KEY=tvly-your_tavily_key_here
\ No newline at end of file
diff --git a/ai_agents/competitive_intelligence_agent/agents_logic.py b/ai_agents/competitive_intelligence_agent/agents_logic.py
index 7d5db8e..e6beb79 100644
--- a/ai_agents/competitive_intelligence_agent/agents_logic.py
+++ b/ai_agents/competitive_intelligence_agent/agents_logic.py
@@ -1,9 +1,3 @@
-<<<<<<< HEAD
-import os
-from crewai import Agent, Task, Crew, Process, LLM
-from crewai_tools import TavilySearchTool
-
-=======
"""CrewAI agent and task definitions for the Competitive Intelligence Agent."""
import os
from dotenv import load_dotenv
@@ -12,7 +6,6 @@ from crewai_tools import TavilySearchTool
load_dotenv()
->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a
# Gemma 4 via LiteLLM/Gemini API
gemma_llm = LLM(
model="gemini/gemma-4-26b-a4b-it",
@@ -20,10 +13,7 @@ gemma_llm = LLM(
)
def get_research_crew(my_company, competitor, pain_point, goal):
-<<<<<<< HEAD
-=======
"""Build and return a sequential CrewAI crew configured for the given company context and competitor."""
->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a
# Specialized Tools
search_tool = TavilySearchTool(api_key=os.getenv("TAVILY_API_KEY"), max_results=3)
diff --git a/ai_agents/competitive_intelligence_agent/main.py b/ai_agents/competitive_intelligence_agent/main.py
index e96eb02..6f543e7 100644
--- a/ai_agents/competitive_intelligence_agent/main.py
+++ b/ai_agents/competitive_intelligence_agent/main.py
@@ -1,16 +1,10 @@
-<<<<<<< HEAD
-=======
"""Gradio UI for the Competitive Intelligence Agent, which generates AI-powered sales battlecards using a CrewAI multi-agent pipeline."""
import re
->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a
import gradio as gr
import io
from contextlib import redirect_stdout
from agents_logic import get_research_crew
-<<<<<<< HEAD
-def run_analysis(my_company, competitor, pain_point, goal):
-=======
def strip_ansi(text: str) -> str:
"""Remove ANSI color and formatting escape sequences from a string."""
@@ -29,34 +23,22 @@ def clean_log(raw: str) -> str:
def run_analysis(my_company, competitor, pain_point, goal):
"""Run the three-agent CrewAI pipeline and return the reasoning log and final battlecard."""
->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a
# Progress logging
f = io.StringIO()
with redirect_stdout(f):
try:
crew = get_research_crew(my_company, competitor, pain_point, goal)
result = crew.kickoff(inputs={
-<<<<<<< HEAD
- "my_company": my_company,
- "competitor": competitor,
- "pain_point": pain_point,
-=======
"my_company": my_company,
"competitor": competitor,
"pain_point": pain_point,
->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a
"goal": goal
})
final_output = result.raw
except Exception as e:
final_output = f"Error: {str(e)}"
-<<<<<<< HEAD
-
- return f.getvalue(), final_output
-=======
return clean_log(strip_ansi(f.getvalue())), final_output
->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a
with gr.Blocks(title="Strategic Intel System") as demo:
gr.Markdown("# ⚔️ Competitive Intelligence Engine")
@@ -71,12 +53,8 @@ with gr.Blocks(title="Strategic Intel System") as demo:
submit_btn = gr.Button("Generate Battlecard", variant="primary")
with gr.Column():
-<<<<<<< HEAD
- logs = gr.Textbox(label="Agent Reasoning Process", lines=10)
-=======
with gr.Accordion("Agent Reasoning Process", open=False):
logs = gr.Textbox(label="Agent Reasoning Process", lines=10)
->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a
output = gr.Markdown(label="Final Battlecard")
submit_btn.click(
diff --git a/ai_agents/competitive_intelligence_agent/pyproject.toml b/ai_agents/competitive_intelligence_agent/pyproject.toml
index aeb9158..5850245 100644
--- a/ai_agents/competitive_intelligence_agent/pyproject.toml
+++ b/ai_agents/competitive_intelligence_agent/pyproject.toml
@@ -1,11 +1,7 @@
[project]
name = "competitive-intelligence-agent"
version = "0.1.0"
-<<<<<<< HEAD
-description = "Add your description here"
-=======
description = "Multi-agent CrewAI system that generates strategic sales battlecards by analyzing competitors against your own business context"
->>>>>>> 1d1e9f137cfd1123edbae5d8e955ce0b9c7fcf4a
readme = "README.md"
requires-python = ">=3.12"
dependencies = [