Skip to main content

A CLI tool for multi-agent LLM tasks

Project description

FlowAI

A CLI tool for multi-agent LLM tasks.

Installation

Run pipx install glagos-flowai

Upgrading

Run pipx upgrade glagos-flowai

Usage

Initialization

First, initialize FlowAI:

flowai --init

This will guide you through an interactive setup process, allowing you to choose your default model, stream mode, and other options using arrow keys for selection. The current settings will be displayed before the onboarding process starts, and you can preselect these values in the prompts.

Check Current Status

To check the current status, including the model and stream mode:

flowai --status

Basic Usage

To run FlowAI with a simple prompt:

flowai "Your prompt here"

Model Selection

To specify a model:

flowai --model openai:gpt-4 "Your prompt here"

To list available models for all providers:

flowai --list-models

Streaming

To stream the output directly without waiting for the full response:

flowai --stream "Your prompt here"

Prompt Files

FlowAI comes pre-packaged with several prompt files designed to assist with git commit messages and pull requests. During initial setup, these files are copied to the ~/flowai-prompts folder. Feel free to add your own custom prompts to this directory as well. However, avoid modifying the included template files, as they will be overwritten during future program updates.

To select a prompt file from the flowai-prompts directory:

flowai --select-prompt-file

Context Options

To use a context file for global context:

flowai --context-file path/to/context "Your prompt here"

To run a shell command to generate context:

flowai --context-shell-command "your-command" "Your prompt here"

To set context from the system clipboard:

flowai --context-from-clipboard "Your prompt here"

Features

  • Model Selection: Support for multiple LLM providers with dynamic model selection.
  • Interactive Setup: User-friendly configuration process.
  • Stream Mode: Real-time response streaming.
  • Prompt Files: Pre-packaged and custom prompt file support.
  • Context Management: Multiple options for providing context (file, shell command, clipboard).
  • Error Reporting: Detailed error reporting and graceful error handling.
  • Configuration Validation: Configuration validation to ensure correct provider-model pairing.
  • Stream Mode Override: Ability to override and update default settings for stream mode.
  • Context Options: Multiple options for setting context (file, shell command, clipboard).

Supported Providers

  • OpenAI: Dynamically fetches available models.
  • Anthropic: Fetches available models from Anthropic API.
  • Groq: Fetches available models from Groq API.
  • Google: Fetches available models from Google API.
  • Ollama: Fetches available models from local Ollama instance.

You can easily extend FlowAI to support additional providers in the future.

Troubleshooting

If you encounter any issues while fetching models or sending prompts, FlowAI will display detailed error messages. Check your API keys and internet connection if you're having trouble connecting to a provider. If you see a configuration error, try running flowai --init to reconfigure FlowAI.

Contributing

We welcome contributions from the community! If you're familiar with a model that isn't currently supported, we'd love your help in integrating it into the library. The library could also use some unit tests. Here's how you can contribute:

  1. Fork the Repository: Start by forking the repository.
  2. Clone the Forked Repository: Clone the forked repository to your local machine and switch into its directory.
  3. Create a New Branch: Create a new branch for each feature or bug fix you're working on.
  4. Make Your Changes: Make the necessary changes in the new branch.
  5. Test Your Changes: Make sure your changes do not break any existing functionality. Add new tests if necessary.
  6. Commit and Push Your Changes: Once you're happy with your changes, commit them and push the branch to your forked repository on GitHub.
  7. Create a Pull Request: Navigate to the original repository and create a pull request. Explain the changes you made, why you believe they're necessary, and any other information you think might be helpful.

After you've submitted your pull request, the maintainers will review your changes. You might be asked to make some additional modifications or provide more context about your changes. Once everything is approved, your changes will be merged into the main branch.

We value all our contributors and are grateful for any time you can spare to help improve FlowAI. Happy coding!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

glagos_flowai-0.4.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

glagos_flowai-0.4.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file glagos_flowai-0.4.0.tar.gz.

File metadata

  • Download URL: glagos_flowai-0.4.0.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.1.0

File hashes

Hashes for glagos_flowai-0.4.0.tar.gz
Algorithm Hash digest
SHA256 1e6a6eba3cbb6d6b264e745bcaa3779b081eaedaf9b684d7d8ed28a6a2684010
MD5 525337674a17dbc343754328cfbcacb4
BLAKE2b-256 d209d20701734ecdfdbca6e057b6549459e57c0c2d8f2a0628f34f32886b9176

See more details on using hashes here.

File details

Details for the file glagos_flowai-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: glagos_flowai-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.5 Darwin/23.1.0

File hashes

Hashes for glagos_flowai-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13234528cd591d912980f079eceaf144a444ab64f983924b786c36a157b1ea2f
MD5 96fea6bff500815e49ad594c3aabdb4d
BLAKE2b-256 40c26c49d96b2af968888a9b90894f58117d8d8cc9f7d39c235e8c9da5ecf68b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page