Skip to content

bruno-llm

Python Version License Tests Code Quality

Production-ready LLM provider implementations for the bruno-core framework.

Features

Multiple Providers - Ollama (local models) - OpenAI (GPT models) - More coming soon (Claude, Gemini, Azure)

🚀 Advanced Features - Response caching (100% test coverage) - Context window management (96% coverage) - Stream aggregation (93% coverage) - Cost tracking (98% coverage) - Middleware system (93% coverage)

🛠️ Production Ready - 203 comprehensive tests - 91% code coverage - Type hints throughout - Async-first design

Quick Start

Installation

pip install bruno-llm

Basic Usage

from bruno_core.models import Message, MessageRole
from bruno_llm import LLMFactory

# Create provider
llm = LLMFactory.create("ollama", {"model": "llama2"})

# Generate response
messages = [Message(role=MessageRole.USER, content="Hello!")]
response = await llm.generate(messages)
print(response)

Documentation Sections

License

MIT License - see LICENSE for details.