ollama-ruby 0.10.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES.md +58 -1
- data/README.md +3 -2
- data/Rakefile +6 -5
- data/bin/ollama_chat +82 -35
- data/lib/ollama/client.rb +5 -5
- data/lib/ollama/documents/cache/common.rb +5 -1
- data/lib/ollama/documents/cache/memory_cache.rb +1 -1
- data/lib/ollama/documents/cache/records.rb +87 -0
- data/lib/ollama/documents/cache/redis_backed_memory_cache.rb +2 -1
- data/lib/ollama/documents/cache/redis_cache.rb +3 -10
- data/lib/ollama/documents/cache/sqlite_cache.rb +215 -0
- data/lib/ollama/documents/splitters/semantic.rb +1 -0
- data/lib/ollama/documents.rb +35 -62
- data/lib/ollama/handlers/say.rb +42 -3
- data/lib/ollama/utils/chooser.rb +15 -1
- data/lib/ollama/utils/tags.rb +2 -1
- data/lib/ollama/version.rb +1 -1
- data/ollama-ruby.gemspec +12 -11
- data/spec/ollama/documents/{memory_cache_spec.rb → cache/memory_cache_spec.rb} +37 -3
- data/spec/ollama/documents/{redis_backed_memory_cache_spec.rb → cache/redis_backed_memory_cache_spec.rb} +19 -7
- data/spec/ollama/documents/{redis_cache_spec.rb → cache/redis_cache_spec.rb} +34 -19
- data/spec/ollama/documents/cache/sqlite_cache_spec.rb +141 -0
- data/spec/ollama/handlers/say_spec.rb +73 -10
- data/spec/ollama/utils/fetcher_spec.rb +24 -24
- data/spec/ollama/utils/tags_spec.rb +7 -2
- metadata +72 -40
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ollama-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Florian Frank
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-11-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gem_hadar
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.6'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
40
|
+
version: '0.6'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rspec
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -100,14 +100,14 @@ dependencies:
|
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '0
|
103
|
+
version: '1.0'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '0
|
110
|
+
version: '1.0'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
112
|
name: infobar
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,34 +136,6 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '1.11'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: kramdown-parser-gfm
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - "~>"
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '1.1'
|
146
|
-
type: :runtime
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - "~>"
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '1.1'
|
153
|
-
- !ruby/object:Gem::Dependency
|
154
|
-
name: terminal-table
|
155
|
-
requirement: !ruby/object:Gem::Requirement
|
156
|
-
requirements:
|
157
|
-
- - "~>"
|
158
|
-
- !ruby/object:Gem::Version
|
159
|
-
version: '3.0'
|
160
|
-
type: :runtime
|
161
|
-
prerelease: false
|
162
|
-
version_requirements: !ruby/object:Gem::Requirement
|
163
|
-
requirements:
|
164
|
-
- - "~>"
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: '3.0'
|
167
139
|
- !ruby/object:Gem::Dependency
|
168
140
|
name: redis
|
169
141
|
requirement: !ruby/object:Gem::Requirement
|
@@ -359,6 +331,9 @@ dependencies:
|
|
359
331
|
- - "~>"
|
360
332
|
- !ruby/object:Gem::Version
|
361
333
|
version: '0.0'
|
334
|
+
- - ">="
|
335
|
+
- !ruby/object:Gem::Version
|
336
|
+
version: 0.0.1
|
362
337
|
type: :runtime
|
363
338
|
prerelease: false
|
364
339
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -366,6 +341,57 @@ dependencies:
|
|
366
341
|
- - "~>"
|
367
342
|
- !ruby/object:Gem::Version
|
368
343
|
version: '0.0'
|
344
|
+
- - ">="
|
345
|
+
- !ruby/object:Gem::Version
|
346
|
+
version: 0.0.1
|
347
|
+
- !ruby/object:Gem::Dependency
|
348
|
+
name: ostruct
|
349
|
+
requirement: !ruby/object:Gem::Requirement
|
350
|
+
requirements:
|
351
|
+
- - "~>"
|
352
|
+
- !ruby/object:Gem::Version
|
353
|
+
version: '0.0'
|
354
|
+
type: :runtime
|
355
|
+
prerelease: false
|
356
|
+
version_requirements: !ruby/object:Gem::Requirement
|
357
|
+
requirements:
|
358
|
+
- - "~>"
|
359
|
+
- !ruby/object:Gem::Version
|
360
|
+
version: '0.0'
|
361
|
+
- !ruby/object:Gem::Dependency
|
362
|
+
name: sqlite-vec
|
363
|
+
requirement: !ruby/object:Gem::Requirement
|
364
|
+
requirements:
|
365
|
+
- - "~>"
|
366
|
+
- !ruby/object:Gem::Version
|
367
|
+
version: '0.0'
|
368
|
+
type: :runtime
|
369
|
+
prerelease: false
|
370
|
+
version_requirements: !ruby/object:Gem::Requirement
|
371
|
+
requirements:
|
372
|
+
- - "~>"
|
373
|
+
- !ruby/object:Gem::Version
|
374
|
+
version: '0.0'
|
375
|
+
- !ruby/object:Gem::Dependency
|
376
|
+
name: sqlite3
|
377
|
+
requirement: !ruby/object:Gem::Requirement
|
378
|
+
requirements:
|
379
|
+
- - "~>"
|
380
|
+
- !ruby/object:Gem::Version
|
381
|
+
version: '2.0'
|
382
|
+
- - ">="
|
383
|
+
- !ruby/object:Gem::Version
|
384
|
+
version: 2.0.1
|
385
|
+
type: :runtime
|
386
|
+
prerelease: false
|
387
|
+
version_requirements: !ruby/object:Gem::Requirement
|
388
|
+
requirements:
|
389
|
+
- - "~>"
|
390
|
+
- !ruby/object:Gem::Version
|
391
|
+
version: '2.0'
|
392
|
+
- - ">="
|
393
|
+
- !ruby/object:Gem::Version
|
394
|
+
version: 2.0.1
|
369
395
|
description: Library that allows interacting with the Ollama API
|
370
396
|
email: flori@ping.de
|
371
397
|
executables:
|
@@ -395,8 +421,10 @@ extra_rdoc_files:
|
|
395
421
|
- lib/ollama/documents.rb
|
396
422
|
- lib/ollama/documents/cache/common.rb
|
397
423
|
- lib/ollama/documents/cache/memory_cache.rb
|
424
|
+
- lib/ollama/documents/cache/records.rb
|
398
425
|
- lib/ollama/documents/cache/redis_backed_memory_cache.rb
|
399
426
|
- lib/ollama/documents/cache/redis_cache.rb
|
427
|
+
- lib/ollama/documents/cache/sqlite_cache.rb
|
400
428
|
- lib/ollama/documents/splitters/character.rb
|
401
429
|
- lib/ollama/documents/splitters/semantic.rb
|
402
430
|
- lib/ollama/dto.rb
|
@@ -460,8 +488,10 @@ files:
|
|
460
488
|
- lib/ollama/documents.rb
|
461
489
|
- lib/ollama/documents/cache/common.rb
|
462
490
|
- lib/ollama/documents/cache/memory_cache.rb
|
491
|
+
- lib/ollama/documents/cache/records.rb
|
463
492
|
- lib/ollama/documents/cache/redis_backed_memory_cache.rb
|
464
493
|
- lib/ollama/documents/cache/redis_cache.rb
|
494
|
+
- lib/ollama/documents/cache/sqlite_cache.rb
|
465
495
|
- lib/ollama/documents/splitters/character.rb
|
466
496
|
- lib/ollama/documents/splitters/semantic.rb
|
467
497
|
- lib/ollama/dto.rb
|
@@ -511,9 +541,10 @@ files:
|
|
511
541
|
- spec/ollama/commands/push_spec.rb
|
512
542
|
- spec/ollama/commands/show_spec.rb
|
513
543
|
- spec/ollama/commands/tags_spec.rb
|
514
|
-
- spec/ollama/documents/memory_cache_spec.rb
|
515
|
-
- spec/ollama/documents/redis_backed_memory_cache_spec.rb
|
516
|
-
- spec/ollama/documents/redis_cache_spec.rb
|
544
|
+
- spec/ollama/documents/cache/memory_cache_spec.rb
|
545
|
+
- spec/ollama/documents/cache/redis_backed_memory_cache_spec.rb
|
546
|
+
- spec/ollama/documents/cache/redis_cache_spec.rb
|
547
|
+
- spec/ollama/documents/cache/sqlite_cache_spec.rb
|
517
548
|
- spec/ollama/documents/splitters/character_spec.rb
|
518
549
|
- spec/ollama/documents/splitters/semantic_spec.rb
|
519
550
|
- spec/ollama/documents_spec.rb
|
@@ -579,9 +610,10 @@ test_files:
|
|
579
610
|
- spec/ollama/commands/push_spec.rb
|
580
611
|
- spec/ollama/commands/show_spec.rb
|
581
612
|
- spec/ollama/commands/tags_spec.rb
|
582
|
-
- spec/ollama/documents/memory_cache_spec.rb
|
583
|
-
- spec/ollama/documents/redis_backed_memory_cache_spec.rb
|
584
|
-
- spec/ollama/documents/redis_cache_spec.rb
|
613
|
+
- spec/ollama/documents/cache/memory_cache_spec.rb
|
614
|
+
- spec/ollama/documents/cache/redis_backed_memory_cache_spec.rb
|
615
|
+
- spec/ollama/documents/cache/redis_cache_spec.rb
|
616
|
+
- spec/ollama/documents/cache/sqlite_cache_spec.rb
|
585
617
|
- spec/ollama/documents/splitters/character_spec.rb
|
586
618
|
- spec/ollama/documents/splitters/semantic_spec.rb
|
587
619
|
- spec/ollama/documents_spec.rb
|