Tags: danielbodnar/aiac
Tags
Add support for azure open ai api adaptations (gofireflyio#59)
Allow copying to clipboard in quiet mode aiac now supports copying to clipboard in quiet mode too. Due to how the X11 clipboard works in Linux, the process must remain live after copying to the clipboard, otherwise the clipboard is cleared. Users can send aiac to the background if they so wish, and the process will exit once the clipboard contents changes.
Introduce chat mode, refactor API (gofireflyio#32) This commit introduces major changes to the library: 1. Chat mode is introduced, allowing conversing with the API in chat models, asking the API to modify previously generated code. After a response is returned, users can hit the "c" key to send further instructions to the API. 2. The `--full` flag is removed in favor of `--readme-file`. This allows storing both the code, and the full output, as separate files, rather than one or the other. The `--readme-file` is optional, the full output will not be saved if not provided. 3. The command line flags are simplified. The `-s` flag is removed. The `-q` flag now enabled non-interactive mode, but will still honor the `--output-file` and `--readme-file` flags. 4. More models are now supported. The output from the `list-models` command is now returned in tabular form, with more information. Every model now has its own maximum tokens value. The code-davinci-002 model is removed as it is about to be removed by OpenAI as well. 5. The library now includes separate methods for completion models and chat models. The former use the `Complete` method, the latter use the `Chat` method, with one or more `Send` method calls on the resulting object. The previous `GenerateCode` method still exists as a simple wrapper around these two. 6. The signature of the `GenerateCode` method is changed. It now requires the model to use (whereas previously it was a Client attribute). Instead of simply returning the generated code and an error, it returns a Response object that contains the generated code, the full output, the API key used, and the number of tokens utilized by the request. 7. Requests to the API now send a temperature value of 0.2 for more deterministic responses. 8. A `version` command is added to the CLI that prints the `aiac` version. 9. The README file is updated with a new demo and updated instructions, including how to use aiac as a library. Due to the backwards-incompatible changes in this commit, the major version of the project is bumped to 3.
Merge pull request gofireflyio#30 from gofireflyio/ido-fixes Fix several bugs/issues
Switch to ChatGPT API by default, allow other models (gofireflyio#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 <liav@infralight.co>
Merge pull request gofireflyio#22 from gofireflyio/ido-api Remove ChatGPT support, document code, small refactor