alexrudall/ruby-openai

Documentation does not include tool choice option

Jbrito6492 opened this issue · 1 comments

Describe the bug

The README example of using functions does not mention the tool choice parameter, which intermittently caused issues during implementation. Sometimes, the API would use our function, resulting in a finish_reason being tool_calls. Other times, the API would not use our function, with a finish_reason being stop.

To Reproduce
Steps to reproduce the behavior:
Follow the functions example in the README.

Expected behavior
We expected the function call to be used consistently with a finish_reason of tool_calls.

Screenshots
N/A

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

Released in v7