Recording an answer
jadpo ai record asks the model once, in development, and keeps its
answer as a recording a test can answer with.
- The command is
jadpo ai record <prompt> --as <name>, the prompt by its name or its type's asjadpo ai showtakes it.--asis required and lower_snake_case, asrecorded("<name>")writes it and its file is named (cli.ai_argumentsotherwise, as for a misspelt prompt, with the nearest). It runs in development, with the settingsjadpo devstarts with,.env.localincluded. - What it asks with. By default the values of the prompt's last call
in
jadpo dev's call log (build/dev/calls.jsonl), which now keeps, for a prompt asked of a model, its values beside the call: each field its text writes as its type's JSON and a conversation's turns as{ content, role }, read back through the prompt's types now. With--fixture <fixture>, the value a fixture of the project makes, one that takes nothing and returns the prompt's type, run asProgramruns a callable alone: no database and every outside call faked, so a fixture that reads or writes records can't make one (recording.failed). No call logged with values and no fixture, or logged values the prompt's types no longer read, isrecording.refused, with nothing sent. - How it asks. As the prompt's first
ai.generatecall in the program asks: with itsas:type, model, schema,attempts:andtimeout:. That is the callrecorded(...)already answers through. Every type a call asks for still decodes the recording injadpo test. A prompt no call asks isrecording.refused. - Never live. Through a package's connection, it refuses before
anything is sent, with the same code
jadpo package recordrefuses with: an environment that chooseslive, and a credential, environment or address nothing sets. The built-in driver,Driver.openai_compatible, has no environment and no key, so it asks whateverurl:names, asjadpo devdoes. - What it keeps is a recording as
Embeddings and recordings describes: the
answer decoded as the call's type and written again as
json.writewrites it, with plain texts and numbers as placeholders by the same code as a package's recordings, and the prompt's version; members in name order, two spaces deep. Nothing is kept (recording.failed, sayingNothing was recorded.) after a refusal,malformedafter every attempt, no answer withintimeout:, a cut-off answer, a prompt too long, or a model that can't be reached or refuses the connection. The same answer again leaves the file as it was. - The stale recording's alert names it as the next step: the hint
after
jadpo test's footer isjadpo ai record <prompt> --as <name>for the first stale recording, and eachdata.alertsentry carries it asnext.
Markdown for agents: /docs/recording-an-answer.md.Built from Jadpo main at a707efb.