riffer 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.release-please-manifest.json +1 -1
- data/CHANGELOG.md +10 -0
- data/README.md +116 -17
- data/Rakefile +16 -0
- data/lib/riffer/version.rb +1 -1
- metadata +12 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2a36bd54b70a03d93c4b955823477288bb7a52fc7f2be090dad466b8aa1ef5dd
|
|
4
|
+
data.tar.gz: 2d305b20b5f85dc3dfdb632624849cc83e9abc049739c703f03da1661fe342e8
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3d82cd6aff279eb94ff710c7c7d3462a81f17a97d93f19c6df9d93cc83749e0d30ac5e8956b4e802ac2e2097c5c816f315a8027be47ce98ed16e7382d1937437
|
|
7
|
+
data.tar.gz: e4d964bc0c1ad34c29639c8ba4a9b5b28a62376608d8b9b4e383127bf55d0948795a820f00f80ee3b71e2bbda61e78b5b6e6f4fc91534058f7069ad1fca3f025
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,16 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [0.4.1](https://github.com/bottrall/riffer/compare/riffer/v0.4.0...riffer/v0.4.1) (2025-12-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* add conditional check for docs job execution based on release creation ([#58](https://github.com/bottrall/riffer/issues/58)) ([97bc6f7](https://github.com/bottrall/riffer/commit/97bc6f79b20902f94edac35b7d9d25c2e033d8bd))
|
|
14
|
+
* add permissions for contents in docs job ([#57](https://github.com/bottrall/riffer/issues/57)) ([1dd5f7a](https://github.com/bottrall/riffer/commit/1dd5f7a817d4f73c1a0cad1a93fee0148ef10705))
|
|
15
|
+
* suppress output during documentation generation ([#53](https://github.com/bottrall/riffer/issues/53)) ([6b7f2d9](https://github.com/bottrall/riffer/commit/6b7f2d9aa7adb5450855097840c971dcf201d8c0))
|
|
16
|
+
* update rdoc command to target the lib directory ([#56](https://github.com/bottrall/riffer/issues/56)) ([c319efe](https://github.com/bottrall/riffer/commit/c319efe039ddb118411ad9e270dc0994d3b8cf5c))
|
|
17
|
+
|
|
8
18
|
## [0.4.0](https://github.com/bottrall/riffer/compare/riffer/v0.3.2...riffer/v0.4.0) (2025-12-29)
|
|
9
19
|
|
|
10
20
|
|
data/README.md
CHANGED
|
@@ -1,43 +1,142 @@
|
|
|
1
1
|
# Riffer
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The all-in-one Ruby framework for building AI-powered applications and agents.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
[](https://badge.fury.io/rb/riffer) ⚠️ Work in progress
|
|
6
6
|
|
|
7
|
-
##
|
|
7
|
+
## Overview
|
|
8
|
+
|
|
9
|
+
Riffer is a comprehensive Ruby framework designed to simplify the development of AI-powered applications and agents. It provides a complete toolkit for integrating artificial intelligence capabilities into your Ruby projects.
|
|
10
|
+
|
|
11
|
+
Key concepts:
|
|
12
|
+
|
|
13
|
+
- **Agents** – orchestrate messages, LLM calls, and tool execution (`Riffer::Agent`).
|
|
14
|
+
- **Providers** – adapters that implement text generation and streaming (`Riffer::Providers::*`).
|
|
15
|
+
- **Messages** – typed message objects for system, user, assistant, and tool messages (`Riffer::Messages::*`).
|
|
16
|
+
|
|
17
|
+
## Features
|
|
18
|
+
|
|
19
|
+
- Minimal, well-documented core for building AI agents
|
|
20
|
+
- Provider abstraction (OpenAI + test provider) for easy testing
|
|
21
|
+
- Streaming support and structured stream events
|
|
22
|
+
- Message converters and helpers for robust message handling
|
|
8
23
|
|
|
9
|
-
|
|
24
|
+
## Requirements
|
|
10
25
|
|
|
11
|
-
|
|
26
|
+
- Ruby 3.2 or later
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
Install the released gem:
|
|
12
31
|
|
|
13
32
|
```bash
|
|
14
|
-
|
|
33
|
+
gem install riffer
|
|
15
34
|
```
|
|
16
35
|
|
|
17
|
-
|
|
36
|
+
Or add to your application's Gemfile:
|
|
18
37
|
|
|
19
|
-
```
|
|
20
|
-
gem
|
|
38
|
+
```ruby
|
|
39
|
+
gem 'riffer'
|
|
21
40
|
```
|
|
22
41
|
|
|
23
|
-
|
|
42
|
+
Install the development branch directly from GitHub:
|
|
43
|
+
|
|
44
|
+
```ruby
|
|
45
|
+
gem 'riffer', git: 'https://github.com/bottrall/riffer.git'
|
|
46
|
+
```
|
|
24
47
|
|
|
25
|
-
|
|
48
|
+
## Quick Start
|
|
49
|
+
|
|
50
|
+
Basic usage with the built-in test provider:
|
|
51
|
+
|
|
52
|
+
```ruby
|
|
53
|
+
require 'riffer'
|
|
54
|
+
|
|
55
|
+
class EchoAgent < Riffer::Agent
|
|
56
|
+
identifier 'echo'
|
|
57
|
+
model 'test/default' # provider/model
|
|
58
|
+
instructions 'You are an assistant that repeats what the user says.'
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
agent = EchoAgent.new
|
|
62
|
+
puts agent.generate('Hello world')
|
|
63
|
+
# => "Test response" (the test provider returns a canned response by default)
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Using the test provider directly (useful for unit tests):
|
|
67
|
+
|
|
68
|
+
```ruby
|
|
69
|
+
provider = Riffer::Providers::Test.new
|
|
70
|
+
provider.stub_response('Hello from test provider!')
|
|
71
|
+
assistant = provider.generate_text(prompt: 'Say hi')
|
|
72
|
+
puts assistant.content # => "Hello from test provider!"
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Streaming example (provider-dependent):
|
|
76
|
+
|
|
77
|
+
```ruby
|
|
78
|
+
provider = Riffer::Providers::Test.new
|
|
79
|
+
enum = provider.stream_text(prompt: 'Stream something')
|
|
80
|
+
enum.each do |chunk|
|
|
81
|
+
puts chunk[:content]
|
|
82
|
+
end
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
Configuration example (OpenAI API key):
|
|
86
|
+
|
|
87
|
+
```ruby
|
|
88
|
+
Riffer.configure do |config|
|
|
89
|
+
config.openai.api_key = ENV['OPENAI_API_KEY']
|
|
90
|
+
end
|
|
91
|
+
```
|
|
26
92
|
|
|
27
93
|
## Development
|
|
28
94
|
|
|
29
|
-
After checking out the repo, run
|
|
95
|
+
After checking out the repo, run:
|
|
96
|
+
|
|
97
|
+
```bash
|
|
98
|
+
bin/setup
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
Run the test suite:
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
bundle exec rake test
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
Check and fix code style:
|
|
30
108
|
|
|
31
|
-
|
|
109
|
+
```bash
|
|
110
|
+
bundle exec rake standard
|
|
111
|
+
bundle exec rake standard:fix
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Run the interactive console:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
bin/console
|
|
118
|
+
```
|
|
32
119
|
|
|
33
120
|
## Contributing
|
|
34
121
|
|
|
35
|
-
|
|
122
|
+
1. Fork the repository and create your branch: `git checkout -b feature/foo`
|
|
123
|
+
2. Run tests and linters locally: `bundle exec rake`
|
|
124
|
+
3. Submit a pull request with a clear description of the change
|
|
125
|
+
|
|
126
|
+
Please follow the [Code of Conduct](https://github.com/bottrall/riffer/blob/main/CODE_OF_CONDUCT.md).
|
|
127
|
+
|
|
128
|
+
## Changelog
|
|
129
|
+
|
|
130
|
+
All notable changes to this project are documented in `CHANGELOG.md`.
|
|
36
131
|
|
|
37
132
|
## License
|
|
38
133
|
|
|
39
|
-
|
|
134
|
+
Licensed under the MIT License. See `LICENSE.txt` for details.
|
|
135
|
+
|
|
136
|
+
## Maintainers
|
|
137
|
+
|
|
138
|
+
- Jake Bottrall — https://github.com/bottrall
|
|
40
139
|
|
|
41
|
-
|
|
140
|
+
---
|
|
42
141
|
|
|
43
|
-
|
|
142
|
+
If you'd like, I can add short usage examples to the documentation site or update the gemspec metadata (authors, homepage, summary).
|
data/Rakefile
CHANGED
|
@@ -6,5 +6,21 @@ require "minitest/test_task"
|
|
|
6
6
|
Minitest::TestTask.create
|
|
7
7
|
|
|
8
8
|
require "standard/rake"
|
|
9
|
+
require "rdoc/task"
|
|
10
|
+
|
|
11
|
+
RDoc::Task.new do |rdoc|
|
|
12
|
+
rdoc.rdoc_dir = "doc"
|
|
13
|
+
rdoc.title = "Riffer Documentation"
|
|
14
|
+
rdoc.main = "README.md"
|
|
15
|
+
|
|
16
|
+
# Explicitly include top-level docs and the library
|
|
17
|
+
rdoc.rdoc_files.include("README.md", "CHANGELOG.md", "LICENSE.txt")
|
|
18
|
+
rdoc.rdoc_files.include("lib/**/*.rb")
|
|
19
|
+
|
|
20
|
+
# Use Markdown where available and ensure UTF-8
|
|
21
|
+
rdoc.options << "--charset" << "utf-8" << "--markup" << "markdown"
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
task docs: :rdoc
|
|
9
25
|
|
|
10
26
|
task default: %i[test standard]
|
data/lib/riffer/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: riffer
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jake Bottrall
|
|
@@ -120,7 +120,10 @@ email:
|
|
|
120
120
|
- jakebottrall@gmail.com
|
|
121
121
|
executables: []
|
|
122
122
|
extensions: []
|
|
123
|
-
extra_rdoc_files:
|
|
123
|
+
extra_rdoc_files:
|
|
124
|
+
- CHANGELOG.md
|
|
125
|
+
- LICENSE.txt
|
|
126
|
+
- README.md
|
|
124
127
|
files:
|
|
125
128
|
- ".release-please-config.json"
|
|
126
129
|
- ".release-please-manifest.json"
|
|
@@ -162,7 +165,13 @@ metadata:
|
|
|
162
165
|
homepage_uri: https://riffer.ai
|
|
163
166
|
source_code_uri: https://github.com/bottrall/riffer
|
|
164
167
|
changelog_uri: https://github.com/bottrall/riffer/blob/main/CHANGELOG.md
|
|
165
|
-
rdoc_options:
|
|
168
|
+
rdoc_options:
|
|
169
|
+
- "--main"
|
|
170
|
+
- README.md
|
|
171
|
+
- "--title"
|
|
172
|
+
- Riffer Documentation
|
|
173
|
+
- "--markup"
|
|
174
|
+
- markdown
|
|
166
175
|
require_paths:
|
|
167
176
|
- lib
|
|
168
177
|
required_ruby_version: !ruby/object:Gem::Requirement
|