alexrudall / ruby-openai

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

Documentation does not include tool choice option #452

Closed Jbrito6492 closed 2 months ago

Jbrito6492 commented 2 months ago

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):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

alexrudall commented 2 months ago

Released in v7