class SessionState: do_evaluation = False do_voice = False status = "active" scenario = None qa_mode = "single" questions = [] start_time = None end_time = None duration_minutes = None attitude = "Happy" mood_score = 5 num_questions = 1 current_question_index = 0 previous_answer = None question = "" ground_truth = "" rep_answer = "" responses = [] queries = [] llm_responses = [] command = "" scores = [] class Company: def __init__(self, name, description, product, product_summary, product_description): self.name = name self.description = description self.product = product self.product_summary = product_summary self.product_description = product_description class Customer: def __init__(self, name, contact_name, contact_role): self.name = name self.contact_name = contact_name self.contact_role = contact_role self.background = None class Opportunity: def __init__(self, id, name, stage, description, value, close_date, activity, next_steps): self.id = id self.name = name self.stage = stage self.description = description self.value = value self.close_date = close_date self.activity = activity self.next_steps = next_steps def __init__(self): self.company = None self.customer = None self.opportunity = None self.scenario = None def add_company_info(self, name, description, product, product_summary, product_description): self.company = self.Company(name, description, product, product_summary, product_description) def add_customer_info(self, name, contact_name, contact_role): self.customer = self.Customer(name, contact_name, contact_role) def add_opportunity_info(self, id, name, stage, description, value, close_date, activity, next_steps): self.opportunity = self.Opportunity(id, name, stage, description, value, close_date, activity, next_steps) def add_scenario_info(self, scenario_data): self.scenario = scenario_data self.add_opportunity_info( id=scenario_data['Opportunity ID'], name=scenario_data['Opportunity Name'], stage=scenario_data['Opportunity Stage'], description=scenario_data['Opportunity Description'], value=scenario_data['Opportunity Value'], close_date=scenario_data['Close Date'], activity=scenario_data['Activity'], next_steps=scenario_data['Next Steps'] ) self.add_customer_info( name=scenario_data['Customer Name'], contact_name=scenario_data['Customer Contact'], contact_role=scenario_data['Customer Contact Role'] ) def get_opening(self): output_lines = [ "**New Scenario**", f"**Customer:** {self.customer.name if self.customer else 'Unknown'}", f"**Opportunity:** {self.opportunity.name if self.opportunity else 'Unknown'}", f"**Value:** {self.opportunity.value if self.opportunity and hasattr(self.opportunity, 'value') else 'Unknown'}", f"**Stage:** {self.opportunity.stage if self.opportunity else 'N/A'}", f"**Target Close Date:** {self.opportunity.close_date if self.opportunity and hasattr(self.opportunity, 'close_date') else 'Unknown'}", f"**Opportunity Description:** {self.opportunity.description if self.opportunity else 'Unknown'}", f"**Meeting with:** {self.customer.contact_name} ({self.customer.contact_role})", f"**Activity:** {self.opportunity.activity if self.opportunity and hasattr(self.opportunity, 'activity') else 'Unknown'}", f"**Current Meeting:** {self.opportunity.next_steps if self.opportunity and hasattr(self.opportunity, 'next_steps') else 'Unknown'}" ] output = "\n".join(output_lines) return output def __str__(self): company_info = f"{self.company.name} - " if self.company else "" customer_info = f"for {self.customer.name}" if self.customer else "" opportunity_info = f"{self.opportunity.name} ({self.opportunity.stage})" if self.opportunity else "No opportunity set" return f"{company_info}Scenario: {opportunity_info} {customer_info}".strip()