Update app.py
Browse files20 unmodified lines212223242425262725262728293031323334293031323536373839343536374041424316 unmodified lines606162606364656620 unmodified linesGEMINI_MODEL = "gemini-1.5-flash"
def system_message_for_python() -> str:system_message = """ You are an assistant that reimplements Python code in high performance C++ for an M1 Mac.""".strip() system_message = """ You are an assistant that reimplements Python code in high performance C++ for an M1 Mac. """.strip()
system_message += """ Respond only with C++; use comments sparingly and do not provide any explanation other than occasion comments. """.strip()
system_message += """ Respond only with C++; use comments sparingly and do not provide any explanation other than occasion comments.""".strip() system_message += """ The C++ response needs to produce an identical output in the fastest possible time. """.strip()
system_message += """ The C++ response needs to produce an identical output in the fastest possible time. """.strip() return system_message
current_time = datetime.now().strftime("%Y%m%d_%H:%M:%S")
16 unmodified lines
def messages_for_python(python): return [ {"role": "system", "content": system_message}, {"role": "system", "content": system_message_for_python()}, {"role": "user", "content": user_prompt_for_python(python)} ]
app.py+16-13