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

Support unsafe function schemas #38

Closed keyboardAnt closed 1 year ago

keyboardAnt commented 1 year ago

LLMs for code are capable of reasoning beyond just what is merely executable ^1. Therefore, I suggest allowing users to provide free-form function schemas that aren't necessarily strictly following the JSON Schema format.

[^1]: Souza, Beatriz, and Michael Pradel. "LExecutor: Learning-Guided Execution." arXiv preprint arXiv:2302.02343 (2023).

minimaxir commented 1 year ago

Function input implementation is handled by a model-by-model basis, which is why the current schema code is in chatgpt.py.

keyboardAnt commented 1 year ago

@minimaxir, what do you mean by "model-by-model basis"?

minimaxir commented 1 year ago

This implementation of structured I/O to ChatGPT is specific to ChatGPT.

keyboardAnt commented 1 year ago

Okay, but why not allow users to provide schemas that violate the JSON Schema format?

minimaxir commented 1 year ago

No point, unless there is evidence that it actually improves generation quality with ChatGPT.

To keep the library simple, I am not adding things for the sake of adding things.