Etapas do fluxo de trabalho

model.generate

type: "model.generate"

Un'appella maqueta. Il cavallìo di la maggior parte delle catene: classifica, sintetiza, brou, extract.

model requiredschema for JSONbilled per call
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

modelstringobrigatório

Un nome di model. Disparèn è negat a salva.

inputsarray

[{ type: "text", content }], immagini incluse.

outputsarray

Que produciu. Text per default.

schemaobject

Un schema JSON. La risposta ritorna come un objete in lugar de prosa.

settingsobject

Temperatura, caputura di output, pensiere.

storagestring

Un stoccaggio di cui i documenti lo contextu.

Saída

{{steps.classify.output.text}}            // the prose
{{steps.classify.output.usage.credits}}   // what it cost
"{{steps.classify.output.text}}"            # the prose
"{{steps.classify.output.usage.credits}}"   # what it cost

Con un schema, i campi dell'ogget sono legibili direttamente — che è ciò che rende la risposta del model safe a ramificare.

Usar un schema sempre che un passo posterior lo leg

Ramiando la prosa ramificando la sorte

Un test di condizione se il testo contine «urgente» rompe la prima volta che il modele scrie «non è urgente». Un schema da un boolean, e la condizione lee un boolean.

{ id: "classify", type: "model.generate", config: {
    model: "gemini-3.5-flash",
    schema: { type: "object", properties: { urgent: { type: "boolean" }, reason: { type: "string" } } },
    inputs: [{ type: "text", content: "Is this urgent? {{input.text}}" }],
} }
{"id": "classify", "type": "model.generate", "config": {
    "model": "gemini-3.5-flash",
    "schema": {"type": "object", "properties": {"urgent": {"type": "boolean"}, "reason": {"type": "string"}}},
    "inputs": [{"type": "text", "content": "Is this urgent? {{input.text}}"}],
}}

E' un appello modello

Facturat come ogni altro, e la step informa i suoi credits. In un trigger agendat o inbound, che costo è pagat per ogni licenziment - mettere i checks baratos per ante di esso.