mirror of
https://github.com/we-promise/sure.git
synced 2026-05-12 23:25:00 +00:00
* Wire conversation history through OpenAI responses API * Fix RuboCop hash brace spacing in assistant tests * Pipelock ignores * Batch fixes --------- Co-authored-by: sokiee <sokysrm@gmail.com>
This commit is contained in:
@@ -63,6 +63,13 @@ class Assistant::Builtin < Assistant::Base
|
||||
responder.respond(previous_response_id: latest_response_id)
|
||||
rescue => e
|
||||
stop_thinking
|
||||
# If we streamed any partial content before the error, the message was
|
||||
# persisted with the default `complete` status. Demote it to `failed` so
|
||||
# `Assistant::Responder#conversation_history` won't feed a broken turn
|
||||
# back into future prompts.
|
||||
if assistant_message&.persisted?
|
||||
assistant_message.update_columns(status: "failed")
|
||||
end
|
||||
chat.add_error(e)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user