#There is the messages array being sent

1 messages · Page 1 of 1 (latest)

low gorge
#

this looks correct. It is calling a function and you're responding with the result and you're giving it the result with the right tool id

#
{
  "role": "tool",
  "name": "writefile",           // This is extra
  "tool_call_id": "call_xyz...",
  "content": "result string"
}
#

the "name" field is extra

#

also try setting parallel_tool_calls to false

fervent yoke
#

okay I'll try without "name". I'll think about parallel tools...

low gorge
#

I would also just clarify to the model when it should be calling those functions. Your actual code isn't wrong, but the model is calling write file again., so it's probably just confused. Ask it why it called it again, and in the response from writefile say "Content successfully written to {}"

fervent yoke
low gorge
#

I would also give an example of the steps and ideal workflow

fervent yoke
#

Without name still does the same...

#

I think I'll try to add a next step after writting file, maybe that will break it out of loop

#

added " - only write json file once " to rules... go no...

#

Okay, got it.....

Added:

**IMPORTANT**
After writting json file, Tell user that JSON was written!!!

To end of system prompt....
that got it...

Meaning it is definitely an o1 training error?

fervent yoke
low gorge
#

Is it good now?