llm.rb 12.1.0 → 12.3.0

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.
Files changed (50) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +248 -0
  3. data/README.md +77 -27
  4. data/data/anthropic.json +3 -2
  5. data/data/bedrock.json +47 -0
  6. data/data/deepinfra.json +2 -2
  7. data/data/google.json +32 -0
  8. data/data/mistral.json +968 -0
  9. data/data/openai.json +422 -0
  10. data/data/xai.json +60 -1
  11. data/lib/llm/active_record/acts_as_agent.rb +11 -0
  12. data/lib/llm/agent.rb +27 -3
  13. data/lib/llm/compactor.rb +2 -2
  14. data/lib/llm/context.rb +18 -26
  15. data/lib/llm/function.rb +6 -0
  16. data/lib/llm/object.rb +13 -0
  17. data/lib/llm/provider.rb +12 -9
  18. data/lib/llm/providers/anthropic.rb +4 -5
  19. data/lib/llm/providers/bedrock.rb +4 -5
  20. data/lib/llm/providers/google.rb +7 -3
  21. data/lib/llm/providers/mistral/request_adapter/completion.rb +122 -0
  22. data/lib/llm/providers/mistral/request_adapter.rb +20 -0
  23. data/lib/llm/providers/mistral.rb +145 -0
  24. data/lib/llm/providers/ollama/response_adapter/completion.rb +39 -0
  25. data/lib/llm/providers/ollama.rb +2 -3
  26. data/lib/llm/providers/openai/responses.rb +6 -3
  27. data/lib/llm/providers/openai.rb +2 -3
  28. data/lib/llm/repl/bar.rb +52 -0
  29. data/lib/llm/repl/input.rb +143 -30
  30. data/lib/llm/repl/markdown.rb +85 -0
  31. data/lib/llm/repl/status.rb +16 -5
  32. data/lib/llm/repl/stream.rb +15 -5
  33. data/lib/llm/repl/transcript.rb +107 -18
  34. data/lib/llm/repl/window.rb +43 -17
  35. data/lib/llm/repl.rb +99 -18
  36. data/lib/llm/sequel/agent.rb +11 -0
  37. data/lib/llm/skill.rb +1 -1
  38. data/lib/llm/stream/disabled.rb +23 -0
  39. data/lib/llm/stream/io.rb +43 -0
  40. data/lib/llm/stream.rb +34 -0
  41. data/lib/llm/tools/git.rb +2 -3
  42. data/lib/llm/tools/pwd.rb +0 -1
  43. data/lib/llm/tools/rg.rb +2 -1
  44. data/lib/llm/tools/swap_text.rb +6 -0
  45. data/lib/llm/transport/execution.rb +1 -0
  46. data/lib/llm/version.rb +1 -1
  47. data/lib/llm.rb +19 -0
  48. data/llm.gemspec +8 -4
  49. data/resources/deepdive.md +170 -50
  50. metadata +15 -4
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llm.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 12.1.0
4
+ version: 12.3.0
5
5
  platform: ruby
6
6
  authors:
7
- - bsdrobert
7
+ - robert
8
8
  - Antar Azri
9
9
  - Rodrigo Serrano
10
10
  bindir: bin
@@ -277,8 +277,11 @@ dependencies:
277
277
  - - "~>"
278
278
  - !ruby/object:Gem::Version
279
279
  version: '1.18'
280
- description: llm.rb is not a library, framework or toolkit but an advanced runtime
281
- for building highly capable AI applications on CRuby.
280
+ description: |
281
+ llm.rb is an advanced runtime for building capable AI applications
282
+ on CRuby. By default it has zero runtime dependencies although certain
283
+ functionality – such as ActiveRecord support – require
284
+ optional dependencies that are opt-in.
282
285
  email:
283
286
  - robert@r.uby.dev
284
287
  executables: []
@@ -293,6 +296,7 @@ files:
293
296
  - data/deepinfra.json
294
297
  - data/deepseek.json
295
298
  - data/google.json
299
+ - data/mistral.json
296
300
  - data/openai.json
297
301
  - data/xai.json
298
302
  - data/zai.json
@@ -419,6 +423,9 @@ files:
419
423
  - lib/llm/providers/google/stream_parser.rb
420
424
  - lib/llm/providers/google/utils.rb
421
425
  - lib/llm/providers/llamacpp.rb
426
+ - lib/llm/providers/mistral.rb
427
+ - lib/llm/providers/mistral/request_adapter.rb
428
+ - lib/llm/providers/mistral/request_adapter/completion.rb
422
429
  - lib/llm/providers/ollama.rb
423
430
  - lib/llm/providers/ollama/error_handler.rb
424
431
  - lib/llm/providers/ollama/models.rb
@@ -460,7 +467,9 @@ files:
460
467
  - lib/llm/providers/zai.rb
461
468
  - lib/llm/registry.rb
462
469
  - lib/llm/repl.rb
470
+ - lib/llm/repl/bar.rb
463
471
  - lib/llm/repl/input.rb
472
+ - lib/llm/repl/markdown.rb
464
473
  - lib/llm/repl/status.rb
465
474
  - lib/llm/repl/stream.rb
466
475
  - lib/llm/repl/transcript.rb
@@ -488,6 +497,8 @@ files:
488
497
  - lib/llm/session.rb
489
498
  - lib/llm/skill.rb
490
499
  - lib/llm/stream.rb
500
+ - lib/llm/stream/disabled.rb
501
+ - lib/llm/stream/io.rb
491
502
  - lib/llm/stream/queue.rb
492
503
  - lib/llm/tool.rb
493
504
  - lib/llm/tool/param.rb