rails_ai 0.2.5 → 0.2.7
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/CHANGELOG.md +143 -186
- data/lib/rails_ai/version.rb +1 -1
- data/lib/rails_ai.rb +3 -3
- 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: deabe555f8119354632a966a6220815b9636fef153ab6761c09f460f7558213f
|
4
|
+
data.tar.gz: 9600859519170b8c972899d87e7eaa387652fac522cdcba95f2f3e684f80c78c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8336c6a56710456dde9df0eddfedf4c033b23923b0675b3a79667d7845744b2536edd6620ccf0c333518be0432419d009f886ab09d4eefaa26592cfa6e679980
|
7
|
+
data.tar.gz: 5663a009d1a8173f5ec01c5f14f040fc331e12772a9ca6b9315a17ba13f0d5e134546340c9ba8bf01ae01735abdd157c43c95fb7f72efe30a23c94ac23025862
|
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,41 @@ All notable changes to the Rails AI gem will be documented in this file.
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
7
7
|
|
8
|
+
## [0.2.5] - 2024-09-21
|
9
|
+
|
10
|
+
### Fixed
|
11
|
+
- Fixed critical syntax error with unmatched `end` statements in `lib/rails_ai.rb`
|
12
|
+
- Resolved `SyntaxError: unexpected 'end'` that was preventing gem loading
|
13
|
+
- Properly structured module and method definitions within correct scope
|
14
|
+
- Fixed gem loading issues that were causing Rails applications to fail
|
15
|
+
|
16
|
+
### Added
|
17
|
+
- `clean_response` utility method for automatic UTF-8 encoding and character cleaning
|
18
|
+
- `chat_clean` method that automatically cleans AI responses
|
19
|
+
- `chat_with_web_search_clean` method with automatic response cleaning
|
20
|
+
- Enhanced error handling for malformed responses
|
21
|
+
|
22
|
+
### Changed
|
23
|
+
- Improved response handling to prevent encoding issues
|
24
|
+
- Better UTF-8 character replacement for invalid characters
|
25
|
+
- Enhanced error handling for character encoding problems
|
26
|
+
|
27
|
+
## [0.2.4] - 2024-09-21
|
28
|
+
|
29
|
+
### Fixed
|
30
|
+
- Fixed character encoding issues in AI responses
|
31
|
+
- Resolved `JSON::GeneratorError` in agent functionality
|
32
|
+
- Fixed garbled character display in agent responses
|
33
|
+
|
34
|
+
### Added
|
35
|
+
- Response cleaning utility methods
|
36
|
+
- Enhanced UTF-8 encoding handling
|
37
|
+
- Better error handling for malformed responses
|
38
|
+
|
39
|
+
### Changed
|
40
|
+
- Improved response processing to handle compressed and encoded data
|
41
|
+
- Enhanced character encoding validation
|
42
|
+
|
8
43
|
## [0.2.3] - 2024-09-21
|
9
44
|
|
10
45
|
### Fixed
|
@@ -50,261 +85,183 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
50
85
|
## [0.2.0] - 2024-09-21
|
51
86
|
|
52
87
|
### Added
|
53
|
-
-
|
54
|
-
-
|
55
|
-
-
|
56
|
-
-
|
57
|
-
-
|
58
|
-
- Custom security scanner with vulnerability detection
|
59
|
-
- CI/CD security monitoring with multiple security tools
|
60
|
-
|
61
|
-
### Fixed
|
62
|
-
- Fixed syntax error with extra `end` keyword in main module
|
63
|
-
- Resolved character encoding issues with UTF-8 conversion
|
64
|
-
- Fixed method visibility and file loading conflicts
|
65
|
-
|
66
|
-
### Security
|
67
|
-
- Implemented input validation for text, file paths, URLs, and Base64 data
|
68
|
-
- Added rate limiting per user and endpoint
|
69
|
-
- Content sanitization to prevent XSS and injection attacks
|
70
|
-
- Secure file handling with path validation and size limits
|
71
|
-
- API security with SSL/TLS enforcement and error handling
|
72
|
-
- SSRF protection with URL validation and host blocking
|
73
|
-
|
74
|
-
## [0.1.9] - 2024-09-21
|
75
|
-
|
76
|
-
### Fixed
|
77
|
-
- Fixed CI validation errors by excluding `.gem` files from gemspec
|
78
|
-
- Resolved `NoMethodError: undefined method 'megabytes'` by adding ActiveSupport dependency
|
79
|
-
- Fixed method visibility issues with `validate_messages` method
|
80
|
-
|
81
|
-
### Changed
|
82
|
-
- Updated gemspec to exclude generated files and security reports
|
83
|
-
- Added `activesupport` dependency for numeric extensions
|
84
|
-
- Improved error handling and method accessibility
|
85
|
-
|
86
|
-
## [0.1.8] - 2024-09-21
|
87
|
-
|
88
|
-
### Fixed
|
89
|
-
- Fixed `NoMethodError: undefined method 'validate_messages'` by making method public
|
90
|
-
- Resolved method visibility conflicts in security module
|
91
|
-
- Fixed file loading order issues
|
92
|
-
|
93
|
-
### Changed
|
94
|
-
- Updated security module to properly load input validator
|
95
|
-
- Improved method accessibility and error handling
|
96
|
-
|
97
|
-
## [0.1.7] - 2024-09-21
|
88
|
+
- Web search integration with Google Search and DuckDuckGo providers
|
89
|
+
- `WebSearch` module with `GoogleSearch` and `DuckDuckGoSearch` classes
|
90
|
+
- `chat_with_web_search` method for real-time information retrieval
|
91
|
+
- Support for current events, news, weather, and time-sensitive queries
|
92
|
+
- Web search fallback to regular chat if search fails
|
98
93
|
|
99
94
|
### Fixed
|
100
|
-
- Fixed `
|
101
|
-
- Resolved
|
102
|
-
- Fixed
|
95
|
+
- Fixed `SyntaxError: unexpected 'end'` in `lib/rails_ai.rb`
|
96
|
+
- Resolved `ArgumentError: unknown keyword: :num_results` in web search
|
97
|
+
- Fixed method parameter passing in `WebSearch.search` method
|
103
98
|
|
104
99
|
### Changed
|
105
|
-
-
|
106
|
-
- Improved error handling
|
100
|
+
- Enhanced chat functionality with web search capabilities
|
101
|
+
- Improved error handling for web search failures
|
102
|
+
- Updated demo application with web search integration
|
107
103
|
|
108
104
|
## [0.1.6] - 2024-09-21
|
109
105
|
|
110
106
|
### Fixed
|
111
|
-
- Fixed `NoMethodError: undefined method '
|
112
|
-
- Resolved
|
113
|
-
- Fixed
|
107
|
+
- Fixed `NoMethodError: undefined method 'megabytes'` by adding ActiveSupport dependency
|
108
|
+
- Resolved gem loading issues in demo application
|
109
|
+
- Fixed `ArgumentError: unknown keyword: :collaboration_strategy` in agent team creation
|
114
110
|
|
115
111
|
### Changed
|
116
|
-
- Updated
|
117
|
-
-
|
112
|
+
- Updated `rails_ai.gemspec` to include `activesupport` dependency
|
113
|
+
- Enhanced agent team creation with proper parameter handling
|
114
|
+
- Improved error handling for missing ActiveSupport extensions
|
118
115
|
|
119
116
|
## [0.1.5] - 2024-09-21
|
120
117
|
|
121
118
|
### Fixed
|
122
|
-
- Fixed
|
123
|
-
- Resolved method
|
124
|
-
- Fixed file loading
|
119
|
+
- Fixed method visibility issues with `validate_messages` method
|
120
|
+
- Resolved `NoMethodError: undefined method 'validate_messages'` in security validation
|
121
|
+
- Fixed file loading conflicts between duplicate `InputValidator` classes
|
125
122
|
|
126
123
|
### Changed
|
127
|
-
- Updated security
|
128
|
-
-
|
124
|
+
- Updated `lib/rails_ai/security.rb` to properly require input validator
|
125
|
+
- Removed duplicate `InputValidator` class definition
|
126
|
+
- Enhanced security validation method availability
|
129
127
|
|
130
128
|
## [0.1.4] - 2024-09-21
|
131
129
|
|
132
130
|
### Fixed
|
133
131
|
- Fixed `NoMethodError: undefined method 'validate_messages'` by making method public
|
134
|
-
- Resolved
|
135
|
-
- Fixed
|
132
|
+
- Resolved security validation issues in demo application
|
133
|
+
- Fixed method visibility in `InputValidator` class
|
136
134
|
|
137
135
|
### Changed
|
138
|
-
-
|
139
|
-
-
|
136
|
+
- Moved `validate_messages` method above `private` keyword in `InputValidator`
|
137
|
+
- Enhanced security validation method accessibility
|
140
138
|
|
141
139
|
## [0.1.3] - 2024-09-21
|
142
140
|
|
143
141
|
### Fixed
|
144
|
-
- Fixed `NoMethodError: undefined method 'validate_messages'`
|
145
|
-
- Resolved method
|
146
|
-
- Fixed
|
142
|
+
- Fixed `NoMethodError: undefined method 'validate_messages'` in security validation
|
143
|
+
- Resolved method availability issues in demo application
|
144
|
+
- Fixed security validation method calls
|
147
145
|
|
148
146
|
### Changed
|
149
|
-
- Updated security
|
150
|
-
-
|
147
|
+
- Updated security validation method definitions
|
148
|
+
- Enhanced error handling for security validation
|
151
149
|
|
152
150
|
## [0.1.2] - 2024-09-21
|
153
151
|
|
154
152
|
### Fixed
|
155
|
-
- Fixed CI
|
156
|
-
- Resolved
|
157
|
-
- Fixed
|
153
|
+
- Fixed CI failure with `rails_ai-0.1.1 contains itself` error
|
154
|
+
- Resolved gemspec file inclusion issues
|
155
|
+
- Fixed `.gem` file inclusion in `s.files` list
|
158
156
|
|
159
157
|
### Changed
|
160
|
-
- Updated gemspec to exclude generated files
|
161
|
-
- Added `
|
162
|
-
-
|
158
|
+
- Updated `rails_ai.gemspec` to exclude generated `.gem` files
|
159
|
+
- Added `*.gem` to `.gitignore`
|
160
|
+
- Enhanced gemspec file filtering
|
163
161
|
|
164
162
|
## [0.1.1] - 2024-09-21
|
165
163
|
|
166
164
|
### Fixed
|
167
165
|
- Fixed `NoMethodError: undefined method 'megabytes'` by adding ActiveSupport dependency
|
168
|
-
- Resolved
|
169
|
-
- Fixed
|
166
|
+
- Resolved gem loading issues in demo application
|
167
|
+
- Fixed `ArgumentError: unknown keyword: :collaboration_strategy` in agent team creation
|
170
168
|
|
171
169
|
### Changed
|
172
|
-
-
|
173
|
-
-
|
174
|
-
- Improved
|
170
|
+
- Updated `rails_ai.gemspec` to include `activesupport` dependency
|
171
|
+
- Enhanced agent team creation with proper parameter handling
|
172
|
+
- Improved error handling for missing ActiveSupport extensions
|
175
173
|
|
176
174
|
## [0.1.0] - 2024-09-21
|
177
175
|
|
178
176
|
### Added
|
179
177
|
- Initial release of Rails AI gem
|
180
|
-
- Multi-provider support
|
178
|
+
- Multi-provider support (OpenAI, Anthropic, Gemini)
|
181
179
|
- Direct API integration without external gem dependencies
|
182
|
-
-
|
183
|
-
-
|
184
|
-
-
|
185
|
-
-
|
186
|
-
-
|
187
|
-
-
|
188
|
-
-
|
189
|
-
-
|
190
|
-
- Agent teams with various collaboration strategies
|
191
|
-
- Agent Manager for centralized system management
|
192
|
-
- Comprehensive security framework
|
193
|
-
- Input validation and sanitization
|
194
|
-
- Rate limiting and content filtering
|
195
|
-
- Secure file handling and API security
|
196
|
-
- SSRF protection and API key management
|
197
|
-
- Audit logging and error handling
|
198
|
-
- Custom security scanner
|
199
|
-
- CI/CD security monitoring
|
200
|
-
- Legal protection framework for Canadian jurisdiction
|
201
|
-
- Commercial license template and monitoring system
|
202
|
-
- Comprehensive documentation and wiki
|
203
|
-
- Rails 5.2+ compatibility with Ruby 3+ support
|
204
|
-
- MIT License with non-commercial use restrictions
|
180
|
+
- Multimodal capabilities (text, image, video, audio)
|
181
|
+
- Agent system with specialized agents and collaboration
|
182
|
+
- Context awareness with user and window context
|
183
|
+
- Security features including input validation and rate limiting
|
184
|
+
- Performance optimizations with connection pooling and caching
|
185
|
+
- Web search integration for real-time information
|
186
|
+
- Comprehensive demo Rails application
|
187
|
+
- Extensive documentation and wiki pages
|
205
188
|
|
206
189
|
### Features
|
207
|
-
- **Text Generation**: Support for GPT-4o, GPT-4, GPT-3.5-turbo
|
208
|
-
- **Image
|
209
|
-
- **Image
|
210
|
-
- **Video
|
211
|
-
- **Audio Processing**:
|
212
|
-
- **
|
213
|
-
- **
|
214
|
-
- **
|
215
|
-
- **
|
216
|
-
- **
|
217
|
-
- **Security**: Comprehensive security framework with multiple protection layers
|
218
|
-
- **Performance**: Optimized for speed with connection pooling and batch processing
|
219
|
-
- **Monitoring**: Continuous monitoring for security and unauthorized use
|
220
|
-
- **Legal Protection**: Canadian legal framework with commercial licensing
|
221
|
-
|
222
|
-
### Technical Details
|
223
|
-
- **Rails Compatibility**: Rails 5.2, 6.x, 7.x, 8.x
|
224
|
-
- **Ruby Compatibility**: Ruby 3.0+
|
225
|
-
- **Dependencies**: Minimal external dependencies for maximum compatibility
|
226
|
-
- **Performance**: Optimized for speed with caching and connection pooling
|
227
|
-
- **Security**: Multiple security layers with input validation and sanitization
|
228
|
-
- **Monitoring**: Continuous monitoring with CI/CD integration
|
229
|
-
- **Documentation**: Comprehensive documentation and wiki
|
230
|
-
- **Legal**: Non-commercial license with commercial licensing available
|
231
|
-
|
232
|
-
### Breaking Changes
|
233
|
-
- None in initial release
|
234
|
-
|
235
|
-
### Deprecated
|
236
|
-
- None in initial release
|
237
|
-
|
238
|
-
### Removed
|
239
|
-
- None in initial release
|
190
|
+
- **Text Generation**: Support for GPT-4o, GPT-4, GPT-3.5-turbo models
|
191
|
+
- **Image Analysis**: Vision models for image understanding
|
192
|
+
- **Image Generation**: DALL-E 3 and DALL-E 2 integration
|
193
|
+
- **Video Analysis**: Frame extraction and analysis capabilities
|
194
|
+
- **Audio Processing**: Whisper integration for speech-to-text
|
195
|
+
- **Agent System**: Multi-agent collaboration with specialized roles
|
196
|
+
- **Context Awareness**: User preferences and window context integration
|
197
|
+
- **Security**: Input validation, rate limiting, content sanitization
|
198
|
+
- **Performance**: Connection pooling, smart caching, request deduplication
|
199
|
+
- **Web Search**: Real-time information retrieval with Google and DuckDuckGo
|
240
200
|
|
241
201
|
### Security
|
242
|
-
- Comprehensive security framework implemented
|
243
202
|
- Input validation and sanitization
|
244
|
-
- Rate limiting and
|
245
|
-
-
|
246
|
-
-
|
247
|
-
-
|
248
|
-
-
|
249
|
-
- CI/CD security monitoring
|
203
|
+
- Rate limiting and abuse prevention
|
204
|
+
- Content filtering and safety checks
|
205
|
+
- API key management and security
|
206
|
+
- SSRF protection and secure HTTP client
|
207
|
+
- Comprehensive error handling
|
250
208
|
|
251
209
|
### Performance
|
252
|
-
-
|
253
|
-
-
|
210
|
+
- Connection pooling for concurrent requests
|
211
|
+
- Smart caching with TTL support
|
212
|
+
- Request deduplication to prevent duplicate API calls
|
213
|
+
- Performance monitoring and metrics
|
254
214
|
- Batch processing capabilities
|
255
|
-
-
|
256
|
-
- Performance monitoring and optimization
|
257
|
-
- Memory management and optimization
|
215
|
+
- Memory optimization
|
258
216
|
|
259
217
|
### Documentation
|
260
218
|
- Comprehensive README with usage examples
|
261
|
-
-
|
262
|
-
-
|
263
|
-
-
|
264
|
-
-
|
265
|
-
-
|
266
|
-
- Commercial license template
|
267
|
-
- GitHub wiki with detailed documentation
|
219
|
+
- API documentation with all methods and parameters
|
220
|
+
- Architecture overview and design decisions
|
221
|
+
- Security guide and best practices
|
222
|
+
- Contributing guidelines and development setup
|
223
|
+
- Wiki pages with detailed feature explanations
|
268
224
|
|
269
225
|
### Legal
|
270
|
-
-
|
271
|
-
-
|
272
|
-
-
|
273
|
-
-
|
274
|
-
-
|
275
|
-
|
226
|
+
- Non-commercial license with commercial licensing available
|
227
|
+
- Legal protection guide for Canadian jurisdiction
|
228
|
+
- Monitoring system for unauthorized commercial use
|
229
|
+
- Cease and desist template for enforcement
|
230
|
+
- Commercial license template ($999/year)
|
231
|
+
|
232
|
+
### Demo Application
|
233
|
+
- Complete Rails demo application (`rails_ai_demo`)
|
234
|
+
- All features demonstrated with working examples
|
235
|
+
- Modern UI with responsive design
|
236
|
+
- Real-time streaming chat
|
237
|
+
- Image analysis and generation demos
|
238
|
+
- Agent system demonstration
|
239
|
+
- Context awareness examples
|
276
240
|
|
277
|
-
|
241
|
+
### Breaking Changes
|
242
|
+
- None (initial release)
|
278
243
|
|
279
|
-
|
280
|
-
|
281
|
-
- **0.2.3**: Fixed agent team creation and improved task execution
|
282
|
-
- **0.2.2**: Fixed streaming demo and cookie overflow issues
|
283
|
-
- **0.2.1**: Added web search integration and real-time information
|
284
|
-
- **0.2.0**: Added comprehensive security framework
|
285
|
-
- **0.1.9**: Fixed CI validation and ActiveSupport dependencies
|
286
|
-
- **0.1.8**: Fixed method visibility and file loading issues
|
287
|
-
- **0.1.7**: Fixed validate_messages method accessibility
|
288
|
-
- **0.1.6**: Updated security module and method accessibility
|
289
|
-
- **0.1.5**: Fixed method visibility and file loading conflicts
|
290
|
-
- **0.1.4**: Made validate_messages method public
|
291
|
-
- **0.1.3**: Fixed method visibility issues
|
292
|
-
- **0.1.2**: Fixed CI validation and added ActiveSupport dependency
|
293
|
-
- **0.1.1**: Fixed megabytes method and added ActiveSupport dependency
|
294
|
-
- **0.1.0**: Initial release with comprehensive AI capabilities
|
244
|
+
### Deprecations
|
245
|
+
- None (initial release)
|
295
246
|
|
296
|
-
|
247
|
+
### Removals
|
248
|
+
- None (initial release)
|
297
249
|
|
298
|
-
|
250
|
+
---
|
299
251
|
|
300
|
-
##
|
252
|
+
## Contributing
|
301
253
|
|
302
|
-
|
254
|
+
Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct and the process for submitting pull requests.
|
303
255
|
|
304
256
|
## Support
|
305
257
|
|
306
|
-
For support
|
258
|
+
For support and questions:
|
259
|
+
- Create an issue on GitHub
|
260
|
+
- Check the wiki documentation
|
261
|
+
- Review the API documentation
|
262
|
+
|
263
|
+
## License
|
307
264
|
|
308
|
-
|
265
|
+
This project is licensed under the PolyForm-Noncommercial-1.0.0 License - see the [LICENSE](LICENSE) file for details.
|
309
266
|
|
310
|
-
For commercial use, please contact
|
267
|
+
For commercial use, please contact the author for licensing terms.
|
data/lib/rails_ai/version.rb
CHANGED
data/lib/rails_ai.rb
CHANGED
@@ -84,15 +84,15 @@ module RailsAi
|
|
84
84
|
end
|
85
85
|
|
86
86
|
def smart_cache
|
87
|
-
@smart_cache ||= Cache
|
87
|
+
@smart_cache ||= Cache
|
88
88
|
end
|
89
89
|
|
90
90
|
def request_deduplicator
|
91
|
-
@request_deduplicator ||= RequestDeduplicator.new
|
91
|
+
@request_deduplicator ||= Performance::RequestDeduplicator.new
|
92
92
|
end
|
93
93
|
|
94
94
|
def performance_monitor
|
95
|
-
@performance_monitor ||= Performance::
|
95
|
+
@performance_monitor ||= Performance::PerformanceMonitor.new
|
96
96
|
end
|
97
97
|
|
98
98
|
def agent_manager
|