Spaces:
Sleeping
Sleeping
| 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 |