ruby-openai
ruby-openai copied to clipboard
Teach runs list endpoints to use parameters
Change
Teach the client.runs.list endpoint about a parameters: kwarg. That kwarg is passed to the underlying GET request.
Motivation
I would like to check the latest run for a thread, and it seems like the best way to do this is to list the runs for a thread limited to 1.
All Submissions:
- [x] Have you followed the guidelines in our Contributing document?
- [x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
- [x] Have you added an explanation of what your changes do and why you'd like us to include them?
Thanks for this, could you add this to the Messages#list endpoint also?
@alexrudall If you pull @shalecraig PR, I can send you another PR with the messages also updated.
I send @shalecraig the PR already, but am not sure if he sees it: https://github.com/coezbek/ruby-openai/tree/patch-1
This is also relevant for RunSteps#list endpoint, even though I doubt there should be more than 20 items in this end-point.
Thanks @shalecraig & @coezbek!