diff options
Diffstat (limited to 'libpanto-c/include/panto.h')
| -rw-r--r-- | libpanto-c/include/panto.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpanto-c/include/panto.h b/libpanto-c/include/panto.h index 94ddcb9..d0c272f 100644 --- a/libpanto-c/include/panto.h +++ b/libpanto-c/include/panto.h @@ -115,6 +115,12 @@ PANTO_EXPORT PantoStatus panto_agent_add_system_message(PantoAgent *agent, const PANTO_EXPORT PantoStatus panto_agent_set_system_prompt(PantoAgent *agent, const char *text); PANTO_EXPORT PantoStatus panto_agent_compact(PantoAgent *agent, const char *override_system_prompt, const char *extra_instructions, PantoCompactionResult *out); PANTO_EXPORT PantoStatus panto_agent_run(PantoAgent *agent, const char *user_text, PantoStream **out); +/* Reset a failed stream back to its turn-open boundary so the caller can + * resume panto_stream_next() after changing the agent config (e.g. catch a + * terminal bad-request, swap the provider config, and retry the SAME turn + * without re-appending the user message). Errors if the stream has not + * failed. */ +PANTO_EXPORT PantoStatus panto_stream_reopen(PantoStream *stream); PANTO_EXPORT void panto_stream_destroy(PantoStream *stream); PANTO_EXPORT PantoNextStatus panto_stream_next(PantoStream *stream, PantoEvent *out); PANTO_EXPORT void panto_event_free(PantoEvent *event); |
