To get started, follow these steps:
-
Setup Python Environment Ensure you have a version 3.9 or higher Python environment. You can create and activate this environment using the following commands, replacing
ToP_env
with your preferred environment name:conda create -n ToP_env python=3.9 -y conda activate ToP_env
-
Install Dependencies: Move into the
ChatDev
directory and install the necessary dependencies by running:cd ChatDev pip3 install -r requirements.txt
-
Set OpenAI API Key: Export your OpenAI API key as an environment variable. Replace
"your_OpenAI_API_key"
with your actual API key. Remember that this environment variable is session-specific, so you need to set it again if you open a new terminal session.( Notice:OpenAI Baes Url is the same operation if is necessary) On Unix/Linux:export OPENAI_API_KEY="your_OpenAI_API_key" or export OPENAI_BASE_URL="your_OpenAI_Base_Url"
On Windows:
$env:OPENAI_API_KEY="your_OpenAI_API_key" or $env:OPENAI_BASE_URL="your_OpenAI_Base_Url"
-
Build Your Software: Use the following command to initiate the building of your software, replacing
[idea]
with your idea's description and[name]
with your desired project name: On Unix/Linux:python3 run.py --task "[idea]" --name "[name]"
On Windows:
python run.py --task "[idea]" --name "[name]"
-
Check instance and Run Your Software: Once over generated, you can find your dynamic instance in
traces_data.txt
and parameters intraces_hyperparameters.txt
, and you can find your software in theWareHouse
directory under a specific project folder, such asname_DefaultOrganization_timestamp
. Run your software using the following command within that directory: On Unix/Linux:cd WareHouse/project_name_DefaultOrganization_timestamp python3 main.py
On Windows:
cd WareHouse/project_name_DefaultOrganization_timestamp python main.py
-
NLDD Different software development tasks are included in the dataset which contains 5 categories, You can choose any software development task in it.
- Use the desired SR to filter the instances in
traces_data.txt
. - If you don't install pm4py, following the below instructions:
pip install pm4py
from pm4py.objects.conversion.log import converter as log_converter
from pm4py.algo.discovery.alpha import algorithm as alpha_miner
from pm4py.visualization.petri_net import visualizer as pn_visualizer
from pm4py.objects.bpmn.exporter import exporter as bpmn_exporter
dataframe = pd.read_csv('/content/traces_eventlog.csv')
event_log = pm4py.convert_to_event_log(dataframe)
process_model = pm4py.discover_bpmn_inductive(event_log)
pm4py.view_bpmn(process_model)
# save the bpmn model to pdf
pm4py.save_vis_bpmn(process_model, "bpmn.pdf")
- Use the ''' https://github.com/woped/P2T.git ''' to clone tool used for process description transfering.
- Put process description as prompt to enchance the LLM.
- Compare the SR of the generated instances of the same task before and after LLM enhancement.