I’m writing a code generation tool, the tool will generate Java code, I tried to use OpenAI (o3-mini, gpt-4o and also deepseek)
Deepseek model is predictable, once it produce wrong code, it’s easy to fix the prompt and once it understand you, it will never produce that wrong code again. Deepseek is great, the only downside is it’s very very slow.
I tried OpenAI for the speed, but I’m struggling , it will produce 99% of correct code , but then it’s 50% of the time produce 1% of uncompiled code, like missing imports, missing quotation. It’s unpredictable, you can fix the prompt and it works, then you run it again with exact prompt and you will get the old error (i.e. missing import ! )
This is my call (I’m using raw http call from my java application )
{
“top_p”:0.1,
“temperature”:0.1,
“messages”:
[
{“role”:“system”,“content”:“You are an advanced AI …\n”},
{“role”:“user”,“content”:"change the category in the product to have a drop down list (physical, digital) "}
],
“model”:“gpt-4o-2024-08-06”
}
What I’m missing ?