3 ms·
The "apply_patch" addition is nice, as have been struggling to get any AI API to correctly return diffs
by gedy 11mo ago
The "apply_patch" addition is nice, as have been struggling to get any AI API to correctly return diffs
- anuramat 11mo agowhat's the point of apply_patch and shell tools though? can't you just define your custom tools with exactly the same behaviour, since you're implementing the actual execution on your side anyway? sounds like vendor lock in for the sake of vendor lock in
- gedy 11mo agoIn my case, I don't want to do diff tool on my side as the diff is much smaller to send. Versus the LLM sending the whole file (slowly), just to send it back.
- anuramat 11mo agoI thought you still need to implement the patching on your side? judging by <https://platform.openai.com/docs/guides/tools-apply-patch https://platform.openai.com/docs/guides/tools-apply-patch>
- gedy 11mo agoYou do, but the issue this helps with is it's difficult to get LLMs to return accurate unified diffs, which are valuable if you are editing some larger text via their APIs. The alternative of letting it send back the entire edited text is pretty slow. So them sending an accurate server-side diff (likely from some actual diff tool and not just LLM generated thing that sort of looks like a diff) is really helpful.