alexrudall / ruby-openai

OpenAI API + Ruby! 🤖❤️ NEW: Assistant Vector Stores
MIT License
2.73k stars 321 forks source link

How can we add parameters to the OpenAI::Messages list call #380

Closed mibock closed 5 months ago

mibock commented 10 months ago

The list messages call in the OpenAI API takes some optional parameters like limit, order, after and before. It would be good to be able to pass these in: def list(thread_id:) @client.get(path: "/threads/#{thread_id}/messages") end ----> def list(thread_id:, parameters: {}) @client.get(path: "/threads/#{thread_id}/messages"). (TODO add the parameters) end Thanks

capjuancode commented 10 months ago

I was able to do this with client.messages.list(thread_id: 'thread_adlkfadkfn')

alexrudall commented 10 months ago

Relevant PR https://github.com/alexrudall/ruby-openai/pull/388

davidpenso commented 6 months ago

Do we know when this PR will be merged https://github.com/alexrudall/ruby-openai/pull/388 ?

alexrudall commented 6 months ago

I can merge this weekend :)

davidpenso commented 5 months ago

Any luck merging this https://github.com/alexrudall/ruby-openai/pull/388? @alexrudall

I can merge this weekend :)

alexrudall commented 5 months ago

OK THIS weekend ;) Released in v7