Skip to content

Optimize responses storage #3646

@ehhuang

Description

@ehhuang

🤔 What is the technical debt you think should be addressed?

Currently we store all inputs in every Responses API request. This means storage takes O(n^2) with n-turn Responses conversation using previous_response_id.

We can optimize this by storing the previous_response_ids and only storing the new input at each turn.

Code pointer:

Writing:

Loading:

input = await self._prepend_previous_response(input, previous_response_id)

💡 What is the benefit of addressing this technical debt?

storage optimization

Other thoughts

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions