zhudotexe / kani

kani (カニ) is a highly hackable microframework for chat-based language models with tool use/function calling. (NLP-OSS @ EMNLP 2023)
https://kani.readthedocs.io
MIT License
560 stars 30 forks source link

Improve error message on missing ai_function docstring #37

Closed zhudotexe closed 7 months ago

zhudotexe commented 7 months ago

Currently, if an ai_function is missing a docstring, Kani does not enforce that one must exist. This causes 400 errors when making requests to OpenAI and is probably unintended. We should raise a nicer error (or at least a warning) on init.