prompt_wrap function

Wrap a prompt with functions for modification and handling the LLM response