teoo33 commited on
Commit
2d07c1f
·
verified ·
1 Parent(s): e9ded14

Create dce.py

Browse files
Files changed (1) hide show
  1. dce.py +73 -0
dce.py ADDED
@@ -0,0 +1,73 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class DiscussionContinuityExpert:
2
+ def __init__(self):
3
+ pass # No API key or specific configuration needed for DCE
4
+
5
+ def run_iteration(self, iteration_number, expert_pee, expert_cae, business_info_form_data, product_service_form_data, previous_outputs=None):
6
+ print(f"\nStarting Iteration no. {iteration_number}: Collaborative Ideation")
7
+ print("DCE's Instructions: [Instructions for PEE and CAE for this iteration]")
8
+
9
+ # PEE generates outputs (or refines based on CAE feedback)
10
+ if iteration_number == 1:
11
+ chatbot_prompt, knowledge_base, faq_section = expert_pee.process_forms(business_info_form_data, product_service_form_data)
12
+ else:
13
+ 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
14
+
15
+ print("\nPEE's Output:")
16
+ print("Chatbot Prompt:\n", chatbot_prompt)
17
+ print("\nKnowledge Base:\n", knowledge_base)
18
+ print("\nFAQ Section:\n", faq_section)
19
+
20
+ # CAE analyzes PEE outputs
21
+ prompt_critique_suggestions, knowledge_base_critique_suggestions, faq_section_critique_suggestions = expert_cae.analyze_outputs(chatbot_prompt, knowledge_base, faq_section)
22
+
23
+ print("\nCAE Analysis:")
24
+ print("Prompt Critique and Suggestions:\n", prompt_critique_suggestions)
25
+ print("\nKnowledge Base Critique and Suggestions:\n", knowledge_base_critique_suggestions)
26
+ print("\nFAQ Section Critique and Suggestions:\n", faq_section_critique_suggestions)
27
+
28
+ # DCE summarizes and sets next steps
29
+ summary = f"""
30
+ DCE's Summary:
31
+ Iteration {iteration_number} Summary: Collaborative ideation completed.
32
+ Next Steps: [Define next steps for PEE and CAE for the next iteration]
33
+ """
34
+ print(summary)
35
+
36
+ actions = """
37
+ Actions:
38
+ PEE: [Task for PEE in next iteration]
39
+ CAE: [Task for CAE in next iteration]
40
+ """
41
+ print(actions)
42
+
43
+ cae_analysis_summary = "CAE Analysis Summary: [Brief summary from CAE]"
44
+ print(cae_analysis_summary)
45
+
46
+ dce_state = "DCE State: Collaborative Ideation - Iteration " + str(iteration_number) + " Completed"
47
+ print(dce_state)
48
+
49
+ goals_next_iteration = """
50
+ Goals for the next iteration:
51
+ #G-NextIteration-1: [Goal 1 for next iteration]
52
+ #G-NextIteration-2: [Goal 2 for next iteration]
53
+ """
54
+ print(goals_next_iteration)
55
+
56
+ current_work_efforts = """
57
+ Current Work Efforts:
58
+ #WE-CurrentIteration-1: [Work Effort 1 for current iteration]
59
+ #WE-CurrentIteration-2: [Work Effort 2 for current iteration]
60
+ """
61
+ print(current_work_efforts)
62
+
63
+ proposed_work_efforts = """
64
+ Proposed Work Efforts:
65
+ #PWE-NextIteration-1: [Proposed Work Effort 1 for next iteration]
66
+ #PWE-NextIteration-2: [Proposed Work Effort 2 for next iteration]
67
+ """
68
+ print(proposed_work_efforts)
69
+
70
+ end_iteration_message = f"End of Iteration no. {iteration_number}: Collaborative Ideation"
71
+ print(end_iteration_message)
72
+
73
+ 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