riffer 0.4.1 → 0.4.2
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 +7 -0
- data/README.md +13 -29
- data/lib/riffer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bb60a1ab6edf223c701c1b3ff1af14a6ff52520541d1d5e757df963436517402
|
|
4
|
+
data.tar.gz: 723b875438e9d787f7199d8ee8d83d8485dfed47686e85e2c43c221a0482c41e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e288711d911bbf4803f770afccf95685067496d0b1443a31ab8f0291ee3a9e58deac4215820e8e261e8966fac9c14f749880d0b07e47b41458d4801406ad75b1
|
|
7
|
+
data.tar.gz: a877dc42d6e07d0f31ca95213603a44fb47d865ea0e1b69ffad8cc898e69f3cce4e96ae6c750d4fe70c0e5e85a1c7efb7bb870c905306db1b67ea0d39adbbb82
|
data/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,13 @@ 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.2](https://github.com/bottrall/riffer/compare/riffer/v0.4.1...riffer/v0.4.2) (2025-12-29)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* update README for clarity on provider usage and examples ([#60](https://github.com/bottrall/riffer/issues/60)) ([b12835c](https://github.com/bottrall/riffer/commit/b12835ce71c29e02074a0897551db50283ac8be6))
|
|
14
|
+
|
|
8
15
|
## [0.4.1](https://github.com/bottrall/riffer/compare/riffer/v0.4.0...riffer/v0.4.1) (2025-12-29)
|
|
9
16
|
|
|
10
17
|
|
data/README.md
CHANGED
|
@@ -17,7 +17,7 @@ Key concepts:
|
|
|
17
17
|
## Features
|
|
18
18
|
|
|
19
19
|
- Minimal, well-documented core for building AI agents
|
|
20
|
-
- Provider abstraction (OpenAI
|
|
20
|
+
- Provider abstraction (OpenAI) for pluggable providers
|
|
21
21
|
- Streaming support and structured stream events
|
|
22
22
|
- Message converters and helpers for robust message handling
|
|
23
23
|
|
|
@@ -47,46 +47,34 @@ gem 'riffer', git: 'https://github.com/bottrall/riffer.git'
|
|
|
47
47
|
|
|
48
48
|
## Quick Start
|
|
49
49
|
|
|
50
|
-
Basic usage with the
|
|
50
|
+
Basic usage with the OpenAI provider:
|
|
51
51
|
|
|
52
52
|
```ruby
|
|
53
53
|
require 'riffer'
|
|
54
54
|
|
|
55
|
+
# Configure OpenAI API key (recommended to use ENV)
|
|
56
|
+
Riffer.configure do |config|
|
|
57
|
+
config.openai.api_key = ENV['OPENAI_API_KEY']
|
|
58
|
+
end
|
|
59
|
+
|
|
55
60
|
class EchoAgent < Riffer::Agent
|
|
56
61
|
identifier 'echo'
|
|
57
|
-
model '
|
|
62
|
+
model 'openai/gpt-5-mini' # provider/model
|
|
58
63
|
instructions 'You are an assistant that repeats what the user says.'
|
|
59
64
|
end
|
|
60
65
|
|
|
61
66
|
agent = EchoAgent.new
|
|
62
67
|
puts agent.generate('Hello world')
|
|
63
|
-
# => "
|
|
68
|
+
# => "Hello world"
|
|
64
69
|
```
|
|
65
70
|
|
|
66
|
-
|
|
71
|
+
Streaming example (OpenAI):
|
|
67
72
|
|
|
68
73
|
```ruby
|
|
69
|
-
provider = Riffer::Providers::
|
|
70
|
-
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')
|
|
74
|
+
provider = Riffer::Providers::OpenAI.new
|
|
75
|
+
enum = provider.stream_text(prompt: 'Stream something', model: 'gpt-4')
|
|
80
76
|
enum.each do |chunk|
|
|
81
|
-
puts chunk
|
|
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']
|
|
77
|
+
puts chunk.content
|
|
90
78
|
end
|
|
91
79
|
```
|
|
92
80
|
|
|
@@ -136,7 +124,3 @@ Licensed under the MIT License. See `LICENSE.txt` for details.
|
|
|
136
124
|
## Maintainers
|
|
137
125
|
|
|
138
126
|
- Jake Bottrall — https://github.com/bottrall
|
|
139
|
-
|
|
140
|
-
---
|
|
141
|
-
|
|
142
|
-
If you'd like, I can add short usage examples to the documentation site or update the gemspec metadata (authors, homepage, summary).
|
data/lib/riffer/version.rb
CHANGED