This project utilizes OpenAI's GPT models to create an application where specified LLMs debate and develop a business plan on a specified theme. The final business plan is output in Markdown format.
- Python: Ensure Python is installed on your machine.
- Virtual Environment (optional but recommended): Create a virtual environment for this project.
- OpenAI API Key: Obtain an API key from OpenAI and set it in the script.
-
Clone the Repository:
git clone https://github.com/takurot/llm_business_plan_debate_with_graphai cd llm_business_plan_debate_with_graphai
-
Install necessary libraries:
pip install openai markdown2
-
Set up OpenAI API Key: Replace
'your_openai_api_key'
in the script with your actual OpenAI API key.
- --theme: The theme for the business plan. Use this to start a debate from a keyword.
- --file: Path to an existing business plan file to deepen ideas.
- --iterations: Number of debate iterations. Default is 5.
-
Start a new debate with a specific theme:
python llm_debate_business_plan.py --theme "Sustainable Energy Solutions" --iterations 10
-
Deepen ideas from an existing business plan file:
python llm_debate_business_plan.py --file "business_plan.md" --iterations 5
- Business Plan: The initial business plan and the deepened business plan are saved as Markdown files.
-
Set the Theme and Iterations:
python llm_debate_business_plan.py --theme "Sustainable Energy Solutions" --iterations 5
-
Run the Script:
python llm_debate_business_plan.py --theme "Sustainable Energy Solutions" --iterations 5
-
Generated Business Plan: The business plan will be saved as
business_plan.md
and the deepened business plan will be saved asdeepened_business_plan.md
in the current directory.
- get_llm_response(prompt, role): Interacts with the OpenAI API to get responses from the LLMs based on the prompt and role.
- debate_on_theme(theme, iterations): Initializes the debate with a given theme and iterates the debate between two LLMs.
- generate_business_plan(history, theme): Generates a business plan from the debate history in Markdown format.
- deepen_ideas(business_plan_content, iterations): Reads an existing business plan and generates deeper ideas and improvements for each section, iterating the debate process.
- The main block of the script sets the theme and iterations, runs the debate, generates the business plan, and deepens the ideas based on the generated or existing business plan.
This project is licensed under the MIT License. See the LICENSE file for more details.