Import directly from chat completions into fine tuning or jsonl file

I have an application heavily using agents/ multi agent architecture.

I need to be able to directly import the chat completions into fine tuning, is there any way/api to perfectly do so?