minimaxir / simpleaichat

Python package for easily interfacing with chat apps, with robust features and minimal code complexity.
MIT License
3.43k stars 224 forks source link

Allow users to provide additional functions (that won't necessarily be called) #46

Closed keyboardAnt closed 11 months ago

minimaxir commented 12 months ago

What's the use case for this?

keyboardAnt commented 12 months ago

See this notebook from OpenAI's Cookbook (starting at section "Basic concepts"), for example.

minimaxir commented 11 months ago

The reason that example has both a get_current_weather and a get_n_day_weather_forecast function is to demonstrate ChatGPT function selection capability, which I explicitly said is out of scope and we're just working with structured data capabilities for now.

There is zero advantage to just adding an extra unnecessary function just because you can, especially since we're hard selecting one for input and/or output.

In the future, please don't submit a blank PR unless it's a trivial fix, and include the problem you're solving and how the PR is the solution. If it's unclear, file an Issue asking if it's within scope.