Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to ChatGPT API by default, allow other models (#27)
* Switch to ChatGPT API by default, allow other models aiac will now use the ChatGPT API (and thus the gpt-3.5-turbo model) instead of the text-davinci-003 model by default. It also allows selecting the model to use, with the aforementioned two being supported, along with the code-davinci-002 model, which is specifically designed to generate code. A model can be selected via the `--model` flag, and a list of all supported models is available via the `list-models` command. Since ChatGPT usually returns a Markdown-formatted description rather than just code, the library will extract the code from the response. A new flag, `--full`, is added to prevent that and echo or save the complete response from the API. The command line prompt will now also allow users to modify the prompt after receiving a response (using the "m" key), along with the previous option to retry with the same prompt. Also included are small fixes: entering Ctrl+D and Ctrl+C after receiving a response will quit the program as expected, rather than regenerate a response. --------- Co-authored-by: Liav Yona <[email protected]>
- Loading branch information