File size: 3,484 Bytes
2d07c1f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
class DiscussionContinuityExpert:
    def __init__(self):
        pass  # No API key or specific configuration needed for DCE

    def run_iteration(self, iteration_number, expert_pee, expert_cae, business_info_form_data, product_service_form_data, previous_outputs=None):
        print(f"\nStarting Iteration no. {iteration_number}: Collaborative Ideation")
        print("DCE's Instructions: [Instructions for PEE and CAE for this iteration]")

        # PEE generates outputs (or refines based on CAE feedback)
        if iteration_number == 1:
            chatbot_prompt, knowledge_base, faq_section = expert_pee.process_forms(business_info_form_data, product_service_form_data)
        else:
            chatbot_prompt, knowledge_base, faq_section = expert_pee.process_forms(business_info_form_data, product_service_form_data) # In future iterations, pass CAE feedback to PEE

        print("\nPEE's Output:")
        print("Chatbot Prompt:\n", chatbot_prompt)
        print("\nKnowledge Base:\n", knowledge_base)
        print("\nFAQ Section:\n", faq_section)

        # CAE analyzes PEE outputs
        prompt_critique_suggestions, knowledge_base_critique_suggestions, faq_section_critique_suggestions = expert_cae.analyze_outputs(chatbot_prompt, knowledge_base, faq_section)

        print("\nCAE Analysis:")
        print("Prompt Critique and Suggestions:\n", prompt_critique_suggestions)
        print("\nKnowledge Base Critique and Suggestions:\n", knowledge_base_critique_suggestions)
        print("\nFAQ Section Critique and Suggestions:\n", faq_section_critique_suggestions)

        # DCE summarizes and sets next steps
        summary = f"""
        DCE's Summary:
        Iteration {iteration_number} Summary: Collaborative ideation completed.
        Next Steps: [Define next steps for PEE and CAE for the next iteration]
        """
        print(summary)

        actions = """
        Actions:
        PEE: [Task for PEE in next iteration]
        CAE: [Task for CAE in next iteration]
        """
        print(actions)

        cae_analysis_summary = "CAE Analysis Summary: [Brief summary from CAE]"
        print(cae_analysis_summary)

        dce_state = "DCE State: Collaborative Ideation - Iteration " + str(iteration_number) + " Completed"
        print(dce_state)

        goals_next_iteration = """
        Goals for the next iteration:
        #G-NextIteration-1: [Goal 1 for next iteration]
        #G-NextIteration-2: [Goal 2 for next iteration]
        """
        print(goals_next_iteration)

        current_work_efforts = """
        Current Work Efforts:
        #WE-CurrentIteration-1: [Work Effort 1 for current iteration]
        #WE-CurrentIteration-2: [Work Effort 2 for current iteration]
        """
        print(current_work_efforts)

        proposed_work_efforts = """
        Proposed Work Efforts:
        #PWE-NextIteration-1: [Proposed Work Effort 1 for next iteration]
        #PWE-NextIteration-2: [Proposed Work Effort 2 for next iteration]
        """
        print(proposed_work_efforts)

        end_iteration_message = f"End of Iteration no. {iteration_number}: Collaborative Ideation"
        print(end_iteration_message)

        return chatbot_prompt, knowledge_base, faq_section, prompt_critique_suggestions, knowledge_base_critique_suggestions, faq_section_critique_suggestions, summary, actions, cae_analysis_summary, dce_state, goals_next_iteration, current_work_efforts, proposed_work_efforts, end_iteration_message