edit_turn
Edit a turn
Rewrites one turn of the script by hand, in place, on the version under review. Any member who can see the episode can use it. It never changes who speaks the turn, never touches turn 0, the disclosure every episode opens with, and never edits a version after approval.
What the server says
The description an agent is given, word for word. This tool makes changes.
Rewrite one turn's text by hand, in place, on the version under review. The speaker stays. Refused with script_version_conflict (with the latest version) when version is not the latest: read the script again.
Input
| Field | Type | Required | What it takes |
|---|---|---|---|
version | whole number | yes | 1 or more |
text | text | yes | 1 to 800 characters |
episodeId | text | yes | not empty; The episode's id, as list_episodes or create_episode answers it. |
index | whole number | yes | 0 or more; The turn's index in the script's turns, from 0; turn 0 is the narrator's disclosure. |
Refusals
A refusal comes back as the tool's result, marked as an error, with the code and what explains it.
| Code | What it means |
|---|---|
episode_not_found | No such episode among the ones the person can see. |
episode_state_conflict | The episode is not in a state that allows this: a script no longer in review, or a retry of an episode that has not failed. The refusal says the state it is in. |
script_not_found | The episode has no script yet: poddub is still writing it. |
script_version_conflict | The version named is not the latest, because the script changed since it was read. The refusal carries the latest version: read the script again. |
turn_locked | Turn 0 is the disclosure every episode opens with, and it cannot be changed. |
turn_not_found | The script has no turn at that index. |
invalid_body | What was sent breaks a rule the input table cannot show: a new text that would break the script, or a fallback for a step that is not the audio, or an engine the show does not offer. |
Every tool can also answer rate_limited and not_a_member: see Limits and Keys.