Capabilities

A capability is a question you write once for a model, for example "Is the lower seal leaking?". It answers, and that is all it does: it writes nothing into your forms. A step of a recipe or one line of a script runs it on an instance, a notebook or a media item, and decides what to do with the answer.

Adding one

Open Capabilities in the menu, next to Recipes, and press New capability.

  • Name: what you call it, for example Seal check.
  • What the model receives: an image, a text, audio or a video. The question always goes with it.
  • Question: in your own words.

To change one later, press its name, change what you need and press Save.

The model that answers is chosen in Connections → External LLM/Models → Which model answers what, where each capability has its own row. Until you choose one of yours, Nocarta's model answers a capability that receives an image or a text. None of Nocarta's models reads audio or a video, so for those you choose one of your own models that reads it: tick Audio or Video under What this model reads on the model (see Models). The line under the choice names your models that read it.

Examples

ReceivesQuestion
An imageIs the lower seal leaking? Answer yes or no.
An imageWhat pressure does the gauge show, in bar? Answer with the number only.
A textWhich parts did the technician say were replaced?
AudioDid the customer agree to the repair? Answer yes or no.
A videoDoes the fan stop at any moment? Answer yes or no.

What it reads

  • An image is a page of the instance or notebook.
  • A text is the text you give, else the transcript of its audio, else the text read from its pages.
  • Audio or a video is one of the instance's media of that kind, or the media item itself.

When there is exactly one, it is used. When there are several and you did not say which, the capability stops and tells you which to name, for example this notebook has 4 pages; say which one with page:.

The answer

The answer is the model's text, as the model gave it. Nothing checks it, so write the question so that the answer is the one you can use, for example Answer yes or no.

Using it in a recipe

In the recipe designer, choose the capability and press + Capability. The step runs it on the one instance the step before it passes on; with more than one, the recipe stops and says so. To put the answer into a field, type the field's name in the step's Field box, and add + Write fields after it. If a step keeps waiting and no answer comes, press Check on the recipe page or the recipes list: a step whose run stopped is marked failed, and you can run the recipe again.

A Decision after a capability step can test its answer, for example to continue only when Seal check answered yes.

Using it in a script

One line runs a capability and gives back its answer (see Automation language):

leak = capability "my.seal_check"
cover = capability "my.land_cover", page: 2
p = capability "my.priority", text: email

A script names your capability by the name shown next to it on the Capabilities page, after In a script or a recipe: my. and its name in small letters, with _ between the words. Seal check is my.seal_check. That name stays the same when you rename the capability. A name without my. is always one of Nocarta's; written without it, your own capability is not found, and the run stops with its my. name.

Without on: it runs on the instance or media item the script runs on. page: names a page, with_page: the second page of a capability that reads two, of: what Count counts, media: a media item, text: gives a text that replaces the item's own, and image: a picture to read instead of a page: an image your script took, or the id of one of your images. With text: or image:, no item is needed. model: names the model that answers this question only, instead of the one chosen in Settings: one of Nocarta's models that answers this capability, for example model: "Kickflip", or the name you gave one of your own models. A name that does not answer this capability stops the run and lists the ones that do.

A script that calls the Nocarta API, for example a desktop script with an API token bound to it, can ask a capability too: with a token that has capabilities:run it starts a run, and with capabilities:read it reads the answer.

Who answers

Nocarta's model answers on Nocarta's servers. Your own model answers from your computer: the window that runs your script calls it, and a recipe step or a browser-mode script hands it to Nocarta Desktop, which must then be open on one of your machines. No other model is asked when the one you chose fails. A model that cannot read what it receives answers with its own error.

Nocarta's capabilities

The Capabilities page also lists Nocarta's own, used by these names in any of the interface languages. They need no question. Among them:

  • Text reads the text of a page.
  • Image reads the text of a page with the image model.
  • Speech writes down audio speech.
  • Describe says what a page shows, in two to four sentences.
  • Compare lists what differs between two pages of one instance. The answer has one line per difference, written what differs: in page 1 → in page 2, or no difference.
  • Count counts on one page what you name in words, for example ticked checkboxes. In a script, write the words with of:; in a recipe step, in the Of box. Without them, Count stops with Count needs `of:`: what to count, in words ("ticked checkboxes"). When the instance has several pages, page: (or the Page box) names the one to read. The answer is a whole number.
  • Locate finds on page 1 the thing page 2 shows. Page 2 is a picture of the thing, for example one bolt. When Locate finds a place, it then checks that this part of page 1 shows the same thing as page 2. The answer is {"box": [x1, y1, x2, y2]}: the corners of a box around it, in pixels of page 1. When the thing is not on page 1, or the check says the place shows something else, the answer is {"box": null}.
  • Translate translates a text, from English into your language. In a script, from: names the text's language and to: the language to translate into, by its name in any of the interface languages, for example to: "Italian". It translates between English, Italian, Portuguese, Spanish, French, German, Chinese, Korean and Japanese.
  • Pros and cons lists the arguments for and against what a text proposes or describes: two short lists, one headed Pros and one headed Cons, in the language of the text. It reads the text of the instance or notebook, or the text you give it. The Nocarta Recipe Pros and cons runs it on a notebook from the notebook's Run Recipe dialog.
  • Say speaks a text aloud with the voice of the computer that runs the script or the recipe, and asks no model: the text stays on that computer. In a script, text: is what to say and language: the language to say it in, your language unless you name another. The answer is "on", or "blocked" when the computer keeps the sound off. On a Nocarta Runner nobody hears it: it says nothing, answers "skipped", and the run goes on. When the computer has no voice for that language, the run stops with This computer has no voice for Korean.

Capabilities that read two pages

Compare and Locate read two pages of the same instance: page 1 and page 2, unless you name others. In a script, name them with page: and with_page:; in a recipe step, with the Page and With page boxes. When the instance has no page 2, the capability stops with this instance has no page 2; it reads page 1 and page 2; name two other pages with page: and with_page:.

words = capability "Describe", page: 1
changes = capability "Compare"
changes = capability "Compare", page: 3, with_page: 4
n = capability "Count", page: 1, of: "ticked checkboxes"
where = capability "Locate", page: 1, with_page: 2

Images instead of pages

Either side of Compare and Locate can be one of your images instead of a page. Upload a picture on the Recordings page and give it a name with Edit name. In a script, with_image: names the image to look for, by its name, and image: the image to look in, by its id, or an image your script took. Give page: or image:, not both, and with_page: or with_image:, not both. When none of your images has that name, the run stops with You have no image named "…".

by: says how Locate finds the thing: "model", the image model (the default), or "pixels". With "pixels" no model is asked: the thing is found only where it looks the same as in your image and has the same size. A button shown larger, smaller or in another colour is not found, and the answer is {"box": null}.

box = capability "Locate", page: 1, with_image: "Save button"
box = capability "Locate", image: image_id, with_image: "Save button"
box = capability "Locate", page: 1, with_image: "Save button", by: "pixels"

Related

  • Recipes — the steps that use a capability
  • Models — choosing the model that answers

Need More Help?

Ask AI Assistant