Skip to content

Component Interactions

This page describes the interactions between components in the Bluefly LLM ecosystem.

Overview

The Bluefly LLM ecosystem consists of several components that interact to provide a comprehensive solution for natural language processing:

  • BFAPI: The central API service that coordinates requests between clients and models
  • BFLLM: The machine learning component that manages model inference and training
  • BFCLI: The command-line interface for interacting with the ecosystem
  • BFUI: The user interface components for building web applications

Interaction Diagrams

Basic Request Flow

  1. Client application sends request to BFAPI
  2. BFAPI validates and processes the request
  3. BFAPI forwards the request to BFLLM for model inference
  4. BFLLM returns the model output to BFAPI
  5. BFAPI formats and returns the response to the client

Learning Flow

  1. User provides feedback on model outputs through BFCLI or application
  2. Feedback is stored in BFAPI database
  3. BFLLM periodically retrieves feedback data for model training
  4. BFLLM updates models based on feedback
  5. Updated models are deployed for inference

API Contracts

The communication between components is governed by well-defined API contracts:

  • BFAPI <-> BFLLM: REST API for model inference and training
  • BFCLI <-> BFAPI: REST API for command-line interactions
  • BFUI <-> BFAPI: REST API for web application interactions

Authentication and Authorization

All interactions between components are secured using JWT authentication:

  1. Components authenticate using API keys or user credentials
  2. BFAPI issues JWT tokens with appropriate scopes
  3. Tokens are included in all API requests
  4. BFAPI validates tokens and enforces authorization rules