Skip to content

Commit 780ea26

Browse files
committed
Fixing
1 parent 920c367 commit 780ea26

7 files changed

+161
-80
lines changed

.DS_Store

-2 KB
Binary file not shown.

agents/market_agent.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,10 @@ def analyze(self, startup_info, mode):
7777

7878
nl_advanced_analysis = self.get_response(prompt, "Formulate a professional and comprehensive analysis please.")
7979
self.logger.info("Natural language analysis completed")
80-
return nl_advanced_analysis
80+
return {
81+
'analysis': nl_advanced_analysis,
82+
'external_report': external_knowledge
83+
}
8184

8285
return analysis
8386

agents/product_agent.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,10 @@ def analyze(self, startup_info, mode):
5757

5858
nl_advanced_analysis = self.get_response(prompt, "Write a comprehensive report about the product analysis from the VC perspective.")
5959
self.logger.info("Natural language analysis completed")
60-
return nl_advanced_analysis
60+
return {
61+
'analysis': nl_advanced_analysis,
62+
'external_report': product_report
63+
}
6164

6265
if mode == "advanced":
6366
self.logger.info("Starting advanced analysis with external research")

baseline_framework.py

+15-21
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
import sys
33
import logging
44
from pydantic import BaseModel, Field
5-
from utils.api_wrapper import get_structured_output
5+
from dotenv import load_dotenv
66

77
# Add the project root directory to the Python path
8-
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
8+
project_root = os.path.abspath(os.path.join(os.path.dirname(__file__)))
99
sys.path.insert(0, project_root)
1010

1111
from agents.base_agent import BaseAgent
@@ -15,15 +15,20 @@ class BaselineAnalysis(BaseModel):
1515
score: float = Field(..., description="Overall score between 1 and 10")
1616
recommendation: str = Field(..., description="Recommendation: 'Successful' or 'Unsuccessful'")
1717

18+
# Load environment variables
19+
load_dotenv()
20+
1821
class BaselineFramework(BaseAgent):
1922
def __init__(self, model="gpt-4o-mini"):
2023
super().__init__(model)
2124
self.logger = logging.getLogger(__name__)
2225

23-
def analyze_startup(self, startup_info_str: str) -> dict:
26+
def analyze_startup(self, startup_info: str) -> dict:
2427
"""Simple baseline analysis using only ChatGPT"""
2528
self.logger.info("Starting baseline analysis")
2629

30+
# Format startup info similar to other agents
31+
2732
prompt = """
2833
You are an experienced venture capitalist analyzing a startup. Based on the provided information,
2934
give a comprehensive analysis and predict if the startup will be successful or not.
@@ -37,41 +42,30 @@ def analyze_startup(self, startup_info_str: str) -> dict:
3742
"""
3843

3944
try:
40-
response = self.get_structured_output(BaselineAnalysis, prompt, startup_info_str)
45+
response = self.get_json_response(BaselineAnalysis, prompt, "Startup Info: " + startup_info)
4146
return response.dict()
4247

4348
except Exception as e:
4449
self.logger.error(f"Error in baseline analysis: {str(e)}")
4550
return {"error": str(e)}
46-
51+
4752
if __name__ == "__main__":
4853
def test_baseline_framework():
4954
# Create a BaselineFramework instance
5055
framework = BaselineFramework()
5156

52-
# Test startup info
53-
test_startup = """
54-
Company Name: TechStart
55-
Description: AI-powered software development platform
56-
Product Details: Cloud-based IDE with AI assistance for code generation and debugging
57-
Technology Stack: Python, React, AWS
58-
Founder Background: Ex-Google engineer with 10 years experience in developer tools
59-
"""
57+
# Test startup info following the pattern from FounderAgent test
58+
startup_info = "We are a startup that provides a platform for AI-powered software development. Our founders are from Oxford university."
6059

6160
try:
62-
# Test analyze_startup method
6361
print("Testing BaselineFramework analyze_startup:")
6462
print("-" * 50)
65-
result = framework.analyze_startup(test_startup)
63+
result = framework.analyze_startup(startup_info)
6664

67-
# Print results in a formatted way
65+
print("\nAnalysis Results:")
6866
for key, value in result.items():
6967
print(f"\n{key}:")
70-
if isinstance(value, dict):
71-
for k, v in value.items():
72-
print(f" {k}: {v}")
73-
else:
74-
print(f" {value}")
68+
print(f" {value}")
7569

7670
print("\nTest completed successfully!")
7771

0 commit comments

Comments
 (0)