Repository navigation
Conversation
bolinfest
force-pushed
the
pr642
branch
5 times, most recently
from
April 25, 2025 18:07
34c2daf to
b05ea21
Compare
bolinfest
marked this pull request as ready for review
April 25, 2025 18:12
bolinfest
force-pushed
the
pr642
branch
2 times, most recently
from
April 25, 2025 18:48
2e1904f to
285c335
Compare
fouad-openai
approved these changes
Apr 25, 2025
Collaborator
Author
|
Whoops, I think I just broke things when |
Collaborator
Author
|
Fix is in #663. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This adds support for the
--disable-response-storageflag across our multiple Rust CLIs to support customers who have opted into Zero-Data Retention (ZDR). The analogous changes to the TypeScript CLI were:For a client using ZDR,
previous_response_idwill never be available, so theinputfield of an API request must include the full transcript of the conversation thus far. As such, this PR changes the type ofPrompt.inputfromVec<ResponseInputItem>toVec<ResponseItem>.Practically speaking,
ResponseItemwas effectively a "superset" ofResponseInputItemalready. The main difference for us is thatResponseItemincludes theFunctionCallvariant that we have to include as part of the conversation history in the ZDR case.Another key change in this PR is modifying
try_run_turn()so that it returns theVec<ResponseItem>for the turn in addition to theVec<ResponseInputItem>produced bytry_run_turn(). This is because the caller ofrun_turn()needs to record theVec<ResponseItem>when ZDR is enabled.To that end, this PR introduces
ZdrTranscript(and addszdr_transcript: Option<ZdrTranscript>tostruct Stateincodex.rs) to take responsibility for maintaining the conversation transcript in the ZDR case.