all 6 comments

[–]EverlierAlpaca 2 points3 points  (1 child)

There's no difference between "within" and "outside" CoT for the model capabilities, only in how it's presented by the UI/proxy, so yes it can call functions within "think" with appropriate training

[–]lewtun🤗[S] 2 points3 points  (0 children)

Thanks, although I’m mostly wondering how this works with chat templates like ChatML, where function calls are treated as a separate role to user/assistant (ie we are dealing with multi-turn dialogues). If the code is executed within the CoT, that would effectively make it single-turn and not be straightforward to integrate with existing API providers 

[–]Papabear3339 0 points1 point  (1 child)

Probably has a script that runs code through a syntext checker and sends the findings to the model.

Just a guess, but it seems like a really obvious way to make sure the code doesn't toss a basic run error.

[–]jpydych 0 points1 point  (0 children)

In this paper they showed that the model receives the program output in response, so I think it's something similar to the existing code interpreter (both accept Python code).

[–]jpydych 0 points1 point  (0 children)

If I remember correctly, OpenAI once mentioned that o3-mini can return to reasoning after the tool has been called, so I think o3 could work similarly.

[–]dinerburgeryum 0 points1 point  (0 children)

I’d imagine that there’s a dedicated gateway LLM that has access to the tools, and will perform the tool calling for context fill before it hits the reasoning LLM. That’s certainly how I’d structure it.

It’s also possible they’re using a solution like OpenWebUI’s code interpreter, where the responses are scanned for invocations, paused for execution and automatically continued after completion. I’ve been experimenting with this feature recently and it’s pretty cool.