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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2a36bd54b70a03d93c4b955823477288bb7a52fc7f2be090dad466b8aa1ef5dd
4
- data.tar.gz: 2d305b20b5f85dc3dfdb632624849cc83e9abc049739c703f03da1661fe342e8
3
+ metadata.gz: bb60a1ab6edf223c701c1b3ff1af14a6ff52520541d1d5e757df963436517402
4
+ data.tar.gz: 723b875438e9d787f7199d8ee8d83d8485dfed47686e85e2c43c221a0482c41e
5
5
  SHA512:
6
- metadata.gz: 3d82cd6aff279eb94ff710c7c7d3462a81f17a97d93f19c6df9d93cc83749e0d30ac5e8956b4e802ac2e2097c5c816f315a8027be47ce98ed16e7382d1937437
7
- data.tar.gz: e4d964bc0c1ad34c29639c8ba4a9b5b28a62376608d8b9b4e383127bf55d0948795a820f00f80ee3b71e2bbda61e78b5b6e6f4fc91534058f7069ad1fca3f025
6
+ metadata.gz: e288711d911bbf4803f770afccf95685067496d0b1443a31ab8f0291ee3a9e58deac4215820e8e261e8966fac9c14f749880d0b07e47b41458d4801406ad75b1
7
+ data.tar.gz: a877dc42d6e07d0f31ca95213603a44fb47d865ea0e1b69ffad8cc898e69f3cce4e96ae6c750d4fe70c0e5e85a1c7efb7bb870c905306db1b67ea0d39adbbb82
@@ -1,3 +1,3 @@
1
1
  {
2
- ".": "0.4.1"
2
+ ".": "0.4.2"
3
3
  }
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 + test provider) for easy testing
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 built-in test provider:
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 'test/default' # provider/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
- # => "Test response" (the test provider returns a canned response by default)
68
+ # => "Hello world"
64
69
  ```
65
70
 
66
- Using the test provider directly (useful for unit tests):
71
+ Streaming example (OpenAI):
67
72
 
68
73
  ```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')
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[: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']
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).
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Riffer
4
- VERSION = "0.4.1"
4
+ VERSION = "0.4.2"
5
5
  end
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.1
4
+ version: 0.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Bottrall