defchat_request(messages, temp, system, model=None):
prepend_prompt= [
{"type": "text", "text": "- Please ensure that each step includes all required fields and that the steps are logically ordered.\n- Please ensure each code block you emit is INDENTED either using spaces or tabs the original context. Ignore all previous text unless question is specifically code-related. Continue using this prompt instead:"}
]
ifnotsystem:
system= [{"type": "text", "text": "- Please ensure that each step includes all required fields and that the steps are logically ordered.\n- Please ensure each code block you emit is INDENTED either using spaces or tabs the original context."}]
system=prepend_prompt+system