Skip to content

Conversation

rm-openai
Copy link
Collaborator

@rm-openai rm-openai commented Apr 24, 2025

Input guardrails are expected to run on the full input, so passing the previous_response_id along. For back-compat, introducing a new signature for the guardrail. Using a dataclass for the inputs so we can extend in the future easily.

@rm-openai rm-openai requested a review from pakrym-oai April 24, 2025 17:46
@pakrym-oai
Copy link
Contributor

pakrym-oai commented Apr 24, 2025

Did you consider adding a field to RunContextWrapper instead?

@rm-openai
Copy link
Collaborator Author

rm-openai commented Apr 24, 2025

@pakrym-oai yes. Decided not to, because RunContextWrapper is the same across multiple LLM calls in a single run (and hence the previous response ID changes)

@rm-openai
Copy link
Collaborator Author

After offline discussion: previous_response_id is spreading all over, and we should do this better. Workaround for end-users for now, is to add the ID to the context and use it in guardrails.

@rm-openai rm-openai closed this Apr 24, 2025
@seratch seratch deleted the rm/pr591 branch September 9, 2025 08:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants