Overview
Last updated
Last updated
BrainyFlow does not provide built-in utilities. Instead, we offer examples that you can implement yourself. This approach gives you more flexibility and control over your project's dependencies and functionality.
: Interact with Language Models
: Tools for visualizing and debugging flows
: Perform web searches
: Split large texts into manageable chunks
: Generate vector embeddings for text
: Store and query vector embeddings
: Convert text to speech
We believe it's a bad practice to include vendor-specific APIs in a general framework for several reasons:
API Volatility: Frequent changes in external APIs lead to heavy maintenance for hardcoded APIs.
Flexibility: You may want to switch vendors, use fine-tuned models, or run them locally.
Optimizations: Prompt caching, batching, and streaming are easier to implement without vendor lock-in.
When implementing utility functions for your BrainyFlow project:
Create a separate file for each utility function in the utils/
directory.
Include a simple test or example usage in each file.
Document the input/output and purpose of each utility function.
Example structure:
By following this approach, you can easily maintain and update your utility functions as needed, without being constrained by the framework's built-in utilities.