FoFabric

Introduction

Since the start of 2023 and GenAI, there has been a surge in the development of AI applications for various tasks. While AI is powerful, integrating this functionality into our daily lives is not straightforward. In other words, AI doesn’t suffer from a lack of capabilities, but rather from an integration problem. Fabric1 was created to address this issue by allowing individuals to apply AI to everyday challenges in a granular manner.

Installation

The official documentation suggests installing fabric in Windows Subsystem for Linux (WSL), but I successfully installed it using Windows 10 PowerShell.

Prerequisites

Before initiating the installation of fabric, it is necessary to install Python. Additionally, although not an official dependency, I received an alert indicating that ffmpeg was missing. Therefore, it is recommended to install ffmpeg as well. The installation may vary, but these were the missing dependencies in my setup.

References:

Instructions

There are numerous comprehensive step-by-step tutorials available on the web, so I will skip the details.

  1. Navigate to the folder where you keep the code:
    cd /path/to/your/code
    

To continue with the fabric setup, follow the steps provided below:

  1. Clone the Repository

    git clone https://github.com/danielmiessler/fabric.git
    
  2. Create a Python Virtual Environment

    py.exe -m venv fabric
    
  3. Navigate to the Folder

    cd fabric
    
  4. Activate the Virtual Environment

    .\Scripts\activate
    
  5. Install Fabric

    pip install .
    
  6. Setup Fabric

    fabric --setup
    

Add any string as key for OpenAI to activate OpenAI API.

  1. Restart Your Shell

  2. Test Fabric

    fabric --help
    

Additional Steps for Local LLM compatibile with OpenAI API

If you intend to use a local LLM, ensure that it is OpenAI API compatible. Install the LLM and start the service. Note the service URL and port.

Before executing the fabric setup, perform the following step:

Create an Environment Variable

$env:OPENAI_BASE_URL="http(s)://<URL>:<port>/v1/"

Additional Tips:

On macOS, pbpaste is available by default. The Windows PowerShell equivalent is Get-Clipboard.