Skip to content

feat(responses): add response input items helper#1794

Open
theamodhshetty wants to merge 1 commit intoopenai:masterfrom
theamodhshetty:codex/add-response-input-items-helper
Open

feat(responses): add response input items helper#1794
theamodhshetty wants to merge 1 commit intoopenai:masterfrom
theamodhshetty:codex/add-response-input-items-helper

Conversation

@theamodhshetty
Copy link
Copy Markdown

Summary

  • add toResponseInputItems() / toResponseInputItem() as public response-history helpers
  • normalize mixed ResponseInputItem | ResponseOutputItem arrays back into clean ResponseInputItem[]
  • strip server-only created_by metadata from output variants that can be replayed as input

Testing

  • ./node_modules/.bin/jest tests/lib/ResponseInputItems.test.ts tests/responsesItems.test.ts --runInBand
  • ./node_modules/.bin/eslint src/lib/responses/ResponseInputItems.ts tests/lib/ResponseInputItems.test.ts tests/responsesItems.test.ts
  • ./scripts/build

Closes #1737.

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.

Create an util to convert a ResponseOutputItem[] into a ResponseInputItem[]

1 participant