This repository contains a prompt parser that converts agentPrompt.txt into a structured JSON format stored in output.json. The parser is implemented in prompt_parser.py.
agentPrompt.txt: The input file containing the raw prompt data.prompt_parser.py: The Python script that parsesagentPrompt.txtand generatesoutput.json.output.json: The generated JSON file containing the parsed data.README.md: This file, explaining the conversion process.
- The parser reads
agentPrompt.txtline by line. - It processes each line to extract relevant information (like system prompts, user messages, etc.).
- The extracted data is structured into a JSON format.
- The structured data is written to
output.json.
To run the parser, execute the following command in the terminal:
python prompt_parser.pyThis will read agentPrompt.txt and update output.json with the parsed data.
Ensure that any changes to agentPrompt.txt are correctly formatted to avoid parsing errors.