Skip to content

v0.3.1 - First Official Release πŸŽ‰

Latest

Choose a tag to compare

@O6lvl4 O6lvl4 released this 26 Dec 08:34
· 19 commits to main since this release

πŸŽ‰ FractoP v0.3.1 - First Official Release

FractoP (Fractal Processor) is a production-ready library for processing infinite-length text with LLMs using fractal architecture.

✨ Key Features

  • UnillM Integration: Seamless integration with @aid-on/unillm for unified LLM access
  • Infinite Length Support: Process documents of any size through intelligent chunking
  • Type-Safe: Full TypeScript support without using any types
  • Enterprise-Grade: Built-in timeouts, retries, and circuit breaker pattern
  • Flexible: Support for any LLM provider through adapters

πŸ“¦ Installation

npm install @aid-on/fractop

πŸš€ Quick Start

With UnillM (Recommended)

import { createWithUnillM } from '@aid-on/fractop';
import { generate } from '@aid-on/unillm';

const processor = createWithUnillM(
  async (chunk) => {
    const result = await generate(
      'groq:llama-3.1-8b-instant',
      [
        { role: 'system', content: 'Summarize this text.' },
        { role: 'user', content: chunk }
      ],
      { groqApiKey: process.env.GROQ_API_KEY }
    );
    return result.text;
  },
  { chunkSize: 3000, overlapSize: 300 }
);

const summary = await processor.process(longText);

With Custom LLM

import { createLLMAdapter, FractalProcessor } from '@aid-on/fractop';

const adapter = createLLMAdapter(async (text) => {
  return await yourLLM.complete(text);
});

const processor = new FractalProcessor(adapter, {
  chunkSize: 3000,
  overlapSize: 300
});

πŸ“š API Reference

  • createWithUnillM() - Create processor optimized for UnillM
  • createLLMAdapter() - Convert async functions to LLMProvider
  • createUnillMProcessor() - Advanced metadata-based processor
  • FractalProcessor - Core processor class
  • simpleMerge() - Simple result merging utility
  • weightedMerge() - Weighted result merging

πŸ§ͺ Tested With

  • GROQ API (Llama 3.1)
  • Full TypeScript type checking
  • Comprehensive test coverage
  • Real-world usage scenarios

πŸ“– Documentation

See the README for complete documentation and examples.

πŸ™ Credits

Built with ❀️ by the Aid-On Team