(output)
| 59 | |
| 60 | # Function to check if the output is a valid HTML/CSS code update |
| 61 | def is_valid_html_css_code(output): |
| 62 | pattern = re.compile(r'<.*?>|{.*?}') |
| 63 | return bool(pattern.search(output)) |
| 64 | |
| 65 | # Function to generate a response using OpenAI's ChatCompletion API |
| 66 | def generate_response(prompt, html_content): |