While it works on a task, DataMind Oda reads files to understand them, writes new files and edits the ones you already have on your computer. This page explains what each kind of step accepts, the limits that apply, and the messages you may see.
A read returns the file's text with its line numbers, so a part read from the middle of a file keeps the file's own numbering. Oda reads text files as UTF-8, and each read covers a window of the file:
. . . (line truncated to <max> chars).(Showing lines <start>-<end> of <total>. Use offset=<next> to continue. ), and Oda continues from <next> when it needs more. When the size limit stopped the read early, the note starts with Output capped. instead.(End of file - total <total> lines).offset <offset> is out of range for "<path>" (<total> lines).PDF files are read page by page instead; Reading PDFs covers the page window, scan handling and the footers. To look for files or text rather than read a file, see Finding files and text.
An image read returns the picture itself; what the step shows is covered in Reading files and images. What the read accepts:
model "<model>" does not declare image input; switch to an image-capable model to read images, and switching the chat to another model fixes it. An installation can also refuse a type outright: <mediaType> images are not accepted by this deployment.the file content is not a supported image format; read_image accepts PNG/ JPEG/ WebP/ GIF; when the file claims a supported format but its bytes do not decode, the bytes do not decode as a supported PNG/ JPEG/ WebP/ GIF image; the file may be truncated or corrupt. Convert the file and ask again.at least one image side exceeds the <n>px limit; downscale the image and read the smaller copy. A picture that had to be scaled still reads; its note ends (downscaled from <W>x<H> px; multiply coordinates by <x> to locate features in the original file).The write step creates a UTF-8 text file, or replaces the whole text of an existing one. Its result ends with one of two lines:
Created file: the file did not exist and was created.Updated file: an existing file was fully replaced.Creating a file does not need an earlier read. Replacing an existing file does; the checks are described below.
An edit replaces literal text in a file and leaves the rest of it as it was. By default the text to replace must appear exactly once, so the change lands where it is meant to. For a change that is meant for every occurrence, Oda uses the replace-all option, Replace all matches. When the text is not found, or it appears more than once while the change is meant for one place, the edit does not run.
Success is reported as The file <displayPath> has been updated successfully., or, for a replace-all edit, The file <displayPath> has been updated. An edit with nothing to replace is refused with old_string must be a non-empty string or old_string and new_string must differ.
Overwriting a whole file needs a prior read in the same chat, and that read sets the version Oda expects to find. When something no longer matches, the change is refused instead of guessing:
cannot modify "<path>": file has not been read — read the file, then retry: Oda did not read that file in this chat. It reads the file, then repeats the change.cannot edit "<path>": file changed since it was read: the file changed after Oda read it. The result adds the remedy re-read the file, then retry, so Oda reads the file again and then repeats the change.In practice:
By default, one read covers up to 2,000 lines and up to 51,200 bytes of the result, and a single line is kept to 2,000 characters. A longer file is read in parts, and the note at the end of each part says where to continue.
(Showing lines 31-60 of 180. Use offset=61 to continue. ) mean?The read covered lines 31 to 60 of the 180-line file. offset=61 is where Oda continues from when it needs the rest; you do not have to do anything about it.
(line truncated to 2000 chars)?That line is longer than the limit of 2,000 characters, so the read shows it cut and marked. The full text stays in the file. Ask Oda for the part you need, or open the file to read that line in full.
The step's result ends with Created file when the file did not exist, and Updated file when an existing file was replaced.
So that it replaces the file's current content, not an outdated copy. Oda reads the file first and keeps the version it saw, and it replaces the file only while that version still matches. A replacement that arrives without a read is refused with cannot modify "<path>": file has not been read — read the file, then retry, and Oda reads the file and retries.
Nothing was changed by the refused step: the file changed outside Oda after it was read. Oda reads the file again (re-read the file, then retry) and then repeats your change against the current text.
For a small edit, yes: the text being replaced must match the file exactly, and that match is its own check. Replacing a whole file is different: Oda reads the file first, then replaces it.
One of four reasons, each with its own message on the step:
model "<model>" does not declare image input; switch to an image-capable model to read images. Switch the chat to a model that accepts images.<mediaType> images are not accepted by this deployment.the file content is not a supported image format; read_image accepts PNG/ JPEG/ WebP/ GIF, or the bytes do not decode (the bytes do not decode as a supported PNG/ JPEG/ WebP/ GIF image; the file may be truncated or corrupt). Convert the file and ask again.at least one image side exceeds the <n>px limit; downscale the image and read the smaller copy.PNG, JPEG, WebP and GIF, including files without a file extension: those are identified by their content. Other formats need converting first.
It was larger than the limits Oda can take in one result, so a smaller copy was made and shown to you. The note under the picture ends (downscaled from <W>x<H> px; multiply coordinates by <x> to locate features in the original file): multiply a position in the shown copy by that factor to find it in the original file.