rubagent 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5927edfe86f9f8361a51ac81f6dae9dcb42dd2c535dafe6cb38a417d727e2ca6
4
- data.tar.gz: aeeb190ec56aeb5ed5356f37c1dcc4f0a283597c7996b6f3ea7346c30d98b618
3
+ metadata.gz: 21fc8232fa5d1374f7d005e89aeb35b2587a9f1bd8043f1383d5ee8e15705a2e
4
+ data.tar.gz: ee4bdb10c67f5b2e4c635b7d68f43bfaaffa235072849d6a0906a4ddc32b149e
5
5
  SHA512:
6
- metadata.gz: e03211ed25284e5269ae6dc3091a91af9f1f43d46287b91840cb1369d5be6320d011a0747893e10a06838b04f355b1b5474c0d43c9ad65d567d3fdec5ec7090f
7
- data.tar.gz: 37755006877d21952d8938b43735088aa83c355a8a61e58dacb0fae10cff83d80fae129d5d23bba04ef5c7a0f4829491d5425156074906cb32ae3fcda6f307cf
6
+ metadata.gz: 44a009f25863a94690306fcdaf52e8a81fb168a998f0dce1b5f6faf9ce440f71799bfb6d25fd3de135741f5c2094b9b14aabe5c51619b113f231cd303e8ebfb4
7
+ data.tar.gz: 46c0fb110532f4544912bc122993bcd5ccf977425e2c8e77ed972d6352dd7747fc9b4795f987e482ad8f90e33298bbc6d8f3d8b719f4ddc1ebc27a6c221e20b9
data/.rubocop.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  AllCops:
2
- TargetRubyVersion: 3.1
3
-
2
+ TargetRubyVersion: 3.4
3
+ NewCops: enable
4
4
  Style/StringLiterals:
5
5
  EnforcedStyle: single_quotes
6
6
 
@@ -8,4 +8,275 @@ Style/StringLiteralsInInterpolation:
8
8
  EnforcedStyle: double_quotes
9
9
 
10
10
  Metrics/ParameterLists:
11
+ Enabled: false
12
+
13
+
14
+
15
+ Gemspec/AddRuntimeDependency: # new in 1.65
16
+ Enabled: true
17
+ Gemspec/DeprecatedAttributeAssignment: # new in 1.30
18
+ Enabled: true
19
+ Gemspec/DevelopmentDependencies: # new in 1.44
20
+ Enabled: true
21
+ Gemspec/RequireMFA: # new in 1.23
22
+ Enabled: true
23
+ Layout/LineContinuationLeadingSpace: # new in 1.31
24
+ Enabled: true
25
+ Layout/LineContinuationSpacing: # new in 1.31
26
+ Enabled: true
27
+ Layout/LineEndStringConcatenationIndentation: # new in 1.18
28
+ Enabled: true
29
+ Layout/SpaceBeforeBrackets: # new in 1.7
30
+ Enabled: true
31
+ Lint/AmbiguousAssignment: # new in 1.7
32
+ Enabled: true
33
+ Lint/AmbiguousOperatorPrecedence: # new in 1.21
34
+ Enabled: true
35
+ Lint/AmbiguousRange: # new in 1.19
36
+ Enabled: true
37
+ Lint/ArrayLiteralInRegexp: # new in 1.71
38
+ Enabled: true
39
+ Lint/ConstantOverwrittenInRescue: # new in 1.31
40
+ Enabled: true
41
+ Lint/ConstantReassignment: # new in 1.70
42
+ Enabled: true
43
+ Lint/CopDirectiveSyntax: # new in 1.72
44
+ Enabled: true
45
+ Lint/DeprecatedConstants: # new in 1.8
46
+ Enabled: true
47
+ Lint/DuplicateBranch: # new in 1.3
48
+ Enabled: true
49
+ Lint/DuplicateMagicComment: # new in 1.37
50
+ Enabled: true
51
+ Lint/DuplicateMatchPattern: # new in 1.50
52
+ Enabled: true
53
+ Lint/DuplicateRegexpCharacterClassElement: # new in 1.1
54
+ Enabled: true
55
+ Lint/DuplicateSetElement: # new in 1.67
56
+ Enabled: true
57
+ Lint/EmptyBlock: # new in 1.1
58
+ Enabled: true
59
+ Lint/EmptyClass: # new in 1.3
60
+ Enabled: true
61
+ Lint/EmptyInPattern: # new in 1.16
62
+ Enabled: true
63
+ Lint/HashNewWithKeywordArgumentsAsDefault: # new in 1.69
64
+ Enabled: true
65
+ Lint/IncompatibleIoSelectWithFiberScheduler: # new in 1.21
66
+ Enabled: true
67
+ Lint/ItWithoutArgumentsInBlock: # new in 1.59
68
+ Enabled: true
69
+ Lint/LambdaWithoutLiteralBlock: # new in 1.8
70
+ Enabled: true
71
+ Lint/LiteralAssignmentInCondition: # new in 1.58
72
+ Enabled: true
73
+ Lint/MixedCaseRange: # new in 1.53
74
+ Enabled: true
75
+ Lint/NoReturnInBeginEndBlocks: # new in 1.2
76
+ Enabled: true
77
+ Lint/NonAtomicFileOperation: # new in 1.31
78
+ Enabled: true
79
+ Lint/NumberedParameterAssignment: # new in 1.9
80
+ Enabled: true
81
+ Lint/NumericOperationWithConstantResult: # new in 1.69
82
+ Enabled: true
83
+ Lint/OrAssignmentToConstant: # new in 1.9
84
+ Enabled: true
85
+ Lint/RedundantDirGlobSort: # new in 1.8
86
+ Enabled: true
87
+ Lint/RedundantRegexpQuantifiers: # new in 1.53
88
+ Enabled: true
89
+ Lint/RedundantTypeConversion: # new in 1.72
90
+ Enabled: true
91
+ Lint/RefinementImportMethods: # new in 1.27
92
+ Enabled: true
93
+ Lint/RequireRangeParentheses: # new in 1.32
94
+ Enabled: true
95
+ Lint/RequireRelativeSelfPath: # new in 1.22
96
+ Enabled: true
97
+ Lint/SharedMutableDefault: # new in 1.70
98
+ Enabled: true
99
+ Lint/SuppressedExceptionInNumberConversion: # new in 1.72
100
+ Enabled: true
101
+ Lint/SymbolConversion: # new in 1.9
102
+ Enabled: true
103
+ Lint/ToEnumArguments: # new in 1.1
104
+ Enabled: true
105
+ Lint/TripleQuotes: # new in 1.9
106
+ Enabled: true
107
+ Lint/UnescapedBracketInRegexp: # new in 1.68
108
+ Enabled: true
109
+ Lint/UnexpectedBlockArity: # new in 1.5
110
+ Enabled: true
111
+ Lint/UnmodifiedReduceAccumulator: # new in 1.1
112
+ Enabled: true
113
+ Lint/UselessConstantScoping: # new in 1.72
114
+ Enabled: true
115
+ Lint/UselessDefined: # new in 1.69
116
+ Enabled: true
117
+ Lint/UselessNumericOperation: # new in 1.66
118
+ Enabled: true
119
+ Lint/UselessRescue: # new in 1.43
120
+ Enabled: true
121
+ Lint/UselessRuby2Keywords: # new in 1.23
122
+ Enabled: true
123
+ Metrics/CollectionLiteralLength: # new in 1.47
124
+ Enabled: true
125
+ Naming/BlockForwarding: # new in 1.24
126
+ Enabled: true
127
+ Security/CompoundHash: # new in 1.28
128
+ Enabled: true
129
+ Security/IoMethods: # new in 1.22
130
+ Enabled: true
131
+ Style/AmbiguousEndlessMethodDefinition: # new in 1.68
132
+ Enabled: true
133
+ Style/ArgumentsForwarding: # new in 1.1
134
+ Enabled: true
135
+ Style/ArrayIntersect: # new in 1.40
136
+ Enabled: true
137
+ Style/BitwisePredicate: # new in 1.68
138
+ Enabled: true
139
+ Style/CollectionCompact: # new in 1.2
140
+ Enabled: true
141
+ Style/CombinableDefined: # new in 1.68
142
+ Enabled: true
143
+ Style/ComparableBetween: # new in 1.74
144
+ Enabled: true
145
+ Style/ComparableClamp: # new in 1.44
146
+ Enabled: true
147
+ Style/ConcatArrayLiterals: # new in 1.41
148
+ Enabled: true
149
+ Style/DataInheritance: # new in 1.49
150
+ Enabled: true
151
+ Style/DigChain: # new in 1.69
152
+ Enabled: true
153
+ Style/DirEmpty: # new in 1.48
154
+ Enabled: true
155
+ Style/DocumentDynamicEvalDefinition: # new in 1.1
156
+ Enabled: true
157
+ Style/EmptyHeredoc: # new in 1.32
158
+ Enabled: true
159
+ Style/EndlessMethod: # new in 1.8
160
+ Enabled: true
161
+ Style/EnvHome: # new in 1.29
162
+ Enabled: true
163
+ Style/ExactRegexpMatch: # new in 1.51
164
+ Enabled: true
165
+ Style/FetchEnvVar: # new in 1.28
166
+ Enabled: true
167
+ Style/FileEmpty: # new in 1.48
168
+ Enabled: true
169
+ Style/FileNull: # new in 1.69
170
+ Enabled: true
171
+ Style/FileRead: # new in 1.24
172
+ Enabled: true
173
+ Style/FileTouch: # new in 1.69
174
+ Enabled: true
175
+ Style/FileWrite: # new in 1.24
176
+ Enabled: true
177
+ Style/HashConversion: # new in 1.10
178
+ Enabled: true
179
+ Style/HashExcept: # new in 1.7
180
+ Enabled: true
181
+ Style/HashFetchChain: # new in 1.75
182
+ Enabled: true
183
+ Style/HashSlice: # new in 1.71
184
+ Enabled: true
185
+ Style/IfWithBooleanLiteralBranches: # new in 1.9
186
+ Enabled: true
187
+ Style/InPatternThen: # new in 1.16
188
+ Enabled: true
189
+ Style/ItAssignment: # new in 1.70
190
+ Enabled: true
191
+ Style/ItBlockParameter: # new in 1.75
192
+ Enabled: true
193
+ Style/KeywordArgumentsMerging: # new in 1.68
194
+ Enabled: true
195
+ Style/MagicCommentFormat: # new in 1.35
196
+ Enabled: true
197
+ Style/MapCompactWithConditionalBlock: # new in 1.30
198
+ Enabled: true
199
+ Style/MapIntoArray: # new in 1.63
200
+ Enabled: true
201
+ Style/MapToHash: # new in 1.24
202
+ Enabled: true
203
+ Style/MapToSet: # new in 1.42
204
+ Enabled: true
205
+ Style/MinMaxComparison: # new in 1.42
206
+ Enabled: true
207
+ Style/MultilineInPatternThen: # new in 1.16
208
+ Enabled: true
209
+ Style/NegatedIfElseCondition: # new in 1.2
210
+ Enabled: true
211
+ Style/NestedFileDirname: # new in 1.26
212
+ Enabled: true
213
+ Style/NilLambda: # new in 1.3
214
+ Enabled: true
215
+ Style/NumberedParameters: # new in 1.22
216
+ Enabled: true
217
+ Style/NumberedParametersLimit: # new in 1.22
218
+ Enabled: true
219
+ Style/ObjectThen: # new in 1.28
220
+ Enabled: true
221
+ Style/OpenStructUse: # new in 1.23
222
+ Enabled: true
223
+ Style/OperatorMethodCall: # new in 1.37
224
+ Enabled: true
225
+ Style/QuotedSymbols: # new in 1.16
226
+ Enabled: true
227
+ Style/RedundantArgument: # new in 1.4
228
+ Enabled: true
229
+ Style/RedundantArrayConstructor: # new in 1.52
230
+ Enabled: true
231
+ Style/RedundantConstantBase: # new in 1.40
232
+ Enabled: true
233
+ Style/RedundantCurrentDirectoryInPath: # new in 1.53
234
+ Enabled: true
235
+ Style/RedundantDoubleSplatHashBraces: # new in 1.41
236
+ Enabled: true
237
+ Style/RedundantEach: # new in 1.38
238
+ Enabled: true
239
+ Style/RedundantFilterChain: # new in 1.52
240
+ Enabled: true
241
+ Style/RedundantFormat: # new in 1.72
242
+ Enabled: true
243
+ Style/RedundantHeredocDelimiterQuotes: # new in 1.45
244
+ Enabled: true
245
+ Style/RedundantInitialize: # new in 1.27
246
+ Enabled: true
247
+ Style/RedundantInterpolationUnfreeze: # new in 1.66
248
+ Enabled: true
249
+ Style/RedundantLineContinuation: # new in 1.49
250
+ Enabled: true
251
+ Style/RedundantRegexpArgument: # new in 1.53
252
+ Enabled: true
253
+ Style/RedundantRegexpConstructor: # new in 1.52
254
+ Enabled: true
255
+ Style/RedundantSelfAssignmentBranch: # new in 1.19
256
+ Enabled: true
257
+ Style/RedundantStringEscape: # new in 1.37
258
+ Enabled: true
259
+ Style/ReturnNilInPredicateMethodDefinition: # new in 1.53
260
+ Enabled: true
261
+ Style/SafeNavigationChainLength: # new in 1.68
262
+ Enabled: true
263
+ Style/SelectByRegexp: # new in 1.22
264
+ Enabled: true
265
+ Style/SendWithLiteralMethodName: # new in 1.64
266
+ Enabled: true
267
+ Style/SingleLineDoEndBlock: # new in 1.57
268
+ Enabled: true
269
+ Style/StringChars: # new in 1.12
270
+ Enabled: true
271
+ Style/SuperArguments: # new in 1.64
272
+ Enabled: true
273
+ Style/SuperWithArgsParentheses: # new in 1.58
274
+ Enabled: true
275
+ Style/SwapValues: # new in 1.1
276
+ Enabled: true
277
+ Style/YAMLFileRead: # new in 1.53
278
+ Enabled: true
279
+ Metrics/MethodLength:
280
+ Enabled: false
281
+ Metrics/AbcSize:
11
282
  Enabled: false
@@ -4,6 +4,7 @@ require 'dry-auto_inject'
4
4
  require 'dry-container'
5
5
  module Rubagent
6
6
  module Containers
7
+ # container a class that registers language models
7
8
  class LlmContainer
8
9
  extend Dry::Container::Mixin
9
10
 
@@ -2,11 +2,13 @@
2
2
 
3
3
  module Rubagent
4
4
  module Llms
5
+ # Models with OpenAI like api
5
6
  class OpenAI < BaseLlm
6
7
  def initialize(model:, url:, api_key: nil)
7
8
  @model = model
8
9
  @api_key = api_key
9
10
  @url = url
11
+ super
10
12
  end
11
13
  end
12
14
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Rubagent
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
@@ -1,9 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Llms
2
4
  class BaseLlm
3
- attr_accessor api_key: String
4
- attr_accessor context_length: Integer
5
- attr_accessor model: String
6
- attr_accessor url: String
5
+ attr_accessor api_key: String, context_length: Integer, model: String, url: String
7
6
  end
8
-
9
7
  end
@@ -1,10 +1,10 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Rubagent
2
4
  module Llms
5
+ # Base class for llm
3
6
  class BaseLlm
4
- attr_accessor api_key: String
5
- attr_accessor context_length: Integer
6
- attr_accessor model: String
7
- attr_accessor url: String
7
+ attr_accessor api_key: String, context_length: Integer, model: String, url: String
8
8
  end
9
9
  end
10
10
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubagent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Viktor C
@@ -92,7 +92,7 @@ files:
92
92
  - LICENSE.txt
93
93
  - README.md
94
94
  - Rakefile
95
- - lib/ragent.rb
95
+ - lib/rubagent.rb
96
96
  - lib/rubagent/containers/llm_container.rb
97
97
  - lib/rubagent/http_client.rb
98
98
  - lib/rubagent/llms/base_llm.rb
@@ -108,7 +108,7 @@ licenses:
108
108
  metadata:
109
109
  source_code_uri: https://github.com/vchekryzhov/rubagent
110
110
  changelog_uri: https://github.com/Vchekryzhov/rubagent/blob/master/CHANGELOG.md
111
- homepage_uri: https://github.com/vchekryzhov/rubagent
111
+ rubygems_mfa_required: 'true'
112
112
  rdoc_options: []
113
113
  require_paths:
114
114
  - lib
@@ -116,7 +116,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
- version: 3.1.0
119
+ version: 3.4.0
120
120
  required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - ">="
File without changes