How do i fine tune with code snippets?

im trying to fine tune gpt 4o mini with code snippets but the problem is quotes " break the jsonl format. i have to substitute the quotes for something else and send it that way. the model actually does well but learn with this new synthax change, i just have to edit the quotes. im wondering if there is a way to send the correct synthax directly

You should use your own code snippet to place a string from a location accepting clear plain text into a JSON itself. Then you will get proper escaping.

Otherwise, you have to manually escape everything that would be input breaking, such \n for a newline, \t for a tab…and \" for a quote character.

You’ll also find that the backslash itself needs to be escaped by being repeated as \\ to be valid.

Alternately, {"content": "She said: \u0022hello\u0022"}

1 Like

bro u are the goat ive been looking for similar posts and u are always the one answering lol