ruby-openai icon indicating copy to clipboard operation
ruby-openai copied to clipboard

Teach runs list endpoints to use parameters

Open shalecraig opened this issue 1 year ago • 3 comments

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?

shalecraig avatar Nov 26 '23 04:11 shalecraig

Thanks for this, could you add this to the Messages#list endpoint also?

alexrudall avatar Dec 04 '23 16:12 alexrudall

@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

coezbek avatar Dec 10 '23 22:12 coezbek

This is also relevant for RunSteps#list endpoint, even though I doubt there should be more than 20 items in this end-point.

coezbek avatar Dec 11 '23 23:12 coezbek

Thanks @shalecraig & @coezbek!

alexrudall avatar Apr 27 '24 12:04 alexrudall