The additional code includes a function to split strings and a section inside `main()` that loads prompts from an external file if any are available. If no new questions are provided, the program proceeds with built-in defaults. If new prompts are provided, they are outputted and copied to `k_prompts`. The author also includes diagnostic non-functional code to output each line of the updated `k_prompts` vector. The solution was tested on an M2 MAX 32GB and MacOS Sonoma 14.0.
Key takeaways:
- The author has made modifications to the `parallel.cpp` file to allow it to read prompts from an external file, as the `./bin/parallel` external alternative-prompt file option was not working.
- The prompts are read from a plain text file and transferred to replace the default `k_prompts` inside `parallel.cpp`.
- A sample output is provided to demonstrate the functionality of the modified code, showing the prompts being loaded and the responses generated.
- The author has also included the additional lines of code used to split the string and load the prompts from the external file.