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
557 stars 30 forks source link

Add improvements to chat_in_terminal #36

Closed zhudotexe closed 7 months ago

zhudotexe commented 7 months ago

Resolves #33

Adds the following kwargs to chat_in_terminal:

:param bool echo: Whether to echo the user's input to stdout after they send a message (e.g. to save in interactive
    notebook outputs; default false)
:param bool ai_first: Whether the user should send the first message (default) or the model should generate a
    completion before prompting the user for a message.
:param int width: The maximum width of the printed outputs (default unlimited).
:param bool show_function_args: Whether to print the arguments the model is calling functions with for each call
    (default false).
:param bool show_function_returns: Whether to print the results of each function call (default false).
:param bool verbose: Equivalent to setting ``echo``, ``show_function_args``, and ``show_function_returns`` to True.