Tags: gofireflyio/aiac
Tags
openai: do not force API key, fix error processing OpenAI backends will no longer require an API key to be provided. This is because users may wish to use a service such as Portkey with its Virtual Keys feature, which doesn't require an API key. If an API key is not provided, an Authorization header is not sent. Also, error handling in the openai implementation is both fixed and expanded to support Portkey error format.
Allow extra headers for specific conversations too This commit adds support for setting extra HTTP headers for all requests issued as part of a specific conversation. These headers will be sent in addition to any extra headers defined for the backend itself, if any, and will take precedence over them. The bedrock implementation does not support extra headers at all at this point.
Allow conversations to have "previous messages" This commit modifies the `Chat` method (in a backwards compatible way) to allow users to start the conversation with previously exchanged messages, i.e. messages that had already been exchanged between the user and the assistant. This practically allows "loading" previous conversations in order to continue them. To support this, the `Chat` method now takes `types.Message` values in a variadic way. The messages field of the `Conversation` type is also exposed now, so that users may save it.
Introduce config files, multiple backends, refactor This commit introduces a major API change for `aiac` in both its CLI and library forms, as per feedback from the community: - `aiac` now uses a configuration file where various named backends may be defined, each targeting a specific LLM provider and environment. For example, one may configure a staging Amazon Bedrock environment, and a production environment. Users refer to these backends using the names they select for them. Command line flags such as `--api-key` and `--aws-profile` are no longer accepted and are now part of the configuration file. - `aiac` no longer hardcodes supported models for each LLM provider. Users can choose any model they want, and set a default model for each backend. The `--list-models` flag (previously the `list-models` subcommand) contacts the LLM provider's API to retrieve a list of supported models. - The `aiac` CLI is now simpler, and is no longer comprised of multiple subcommands, meaning flags such as `--model` no longer need to be provided before the "get" argument (which was actually a subcommand before), they will be accepted anywhere (outside of the actual prompt). The word "get" or "generate" no longer need to be used at all either. - `aiac` no longer errors out when the provider API response notes that the result was truncated. Apparently, this isn't always accurate. Instead, the "stop reason" returned by the API is returned to the user as part of the output. Refer to the [README.md](README.md) file for more information, including how to upgrade from a previous version. Resolves: #91, #121, #123
Fix release workflow The release workflow stopped working. This commit fixes it and also updates actions used by it. To simplify the project management, the Homebrew formula is also moved from the "homebrew-aiac" repository into this repository.
Add support for the Ollama backend This commit introduces support for the ollama.ai backend. Ollama is an open source LLAMA backend meant for local usage. It supports many different models, many of them related to code generation. Usage of the ollama backend is available via the `--backend` flag or `AIAC_BACKEND` environment variables set to `"ollama"`. Ollama doesn't support authentication currently, so the only related flag is `--ollama-url` for the API server's URL, but if not used, the default URL is used (http://localhost:11434/api). With this commit, `aiac` will not yet support a scenario where the API server is running behind an authenticating proxy. Resolves: #77
Add ability to save and continue chatting The aiac prompt line, after showing results from the LLM provider, allows saving only once, as it exits immediately after saving. This commit introduces the ability to save and continue chatting, thus allowing users to save multiple files during a conversation with the model. For backwards compatibility purposes, the "s" key will still save and exit, but the new "w" key can be used to save and continue chatting.
PreviousNext