llm_specs 0.1.8 → 0.2.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c24274787a950d2423547ddd06869a47e4f2b2c3b0b721f7abe141efea300d95
4
- data.tar.gz: edeb2f59d249b951e8c8c6e19d6caa289c22c1055eba5ef813270838ffc560fe
3
+ metadata.gz: 81de39be8dfae6778725b265ee16a65cdfbbc5f10becd03fb1537c895cb7f8d4
4
+ data.tar.gz: 3c53b4ee94aaadd71070f89d9c76ddcf7f5a662e1cce2bc62b2626d63e81383e
5
5
  SHA512:
6
- metadata.gz: 0ce566d5d907459e7250bc292f5eda9d6d5e13a82c97bc949838eaa49411d16dbfddf0017805099a2c0f256be718149526807f914bdebedd2bbb41801e85b52d
7
- data.tar.gz: a450a7b8b9253abc24d0dc17418cde60bf8da02c92f29d4964c9dfd60fad7cacb3a582c269ebf54436023dd8d514aa1f5f52d14fbff8f3cce699059703b47b10
6
+ metadata.gz: fc192a767f25c7563c6eb6c3ca32b66d08fc905ae6b4a856c597e3b2074ecf517a417ab46ccd3a59da215a98a1e827d3e93cb9b5b9717ac3f2a7359fe0fde23d
7
+ data.tar.gz: 7e7bebb57d8f2875f604c519bac4685f78cf9d0227107bcebabc32e9d1fd4b6efa2febb62d04484ed1c1ee47c2cd4277821fabae60d7d9bab0284bd62747675d
data/README.md CHANGED
@@ -16,7 +16,12 @@ It provides a simple, efficient way to access model metadata with built-in cachi
16
16
  ```ruby
17
17
  require 'llm_specs'
18
18
 
19
- models = LLMSpecs.models
19
+ models = LLMSpecs.models # all models
20
+
21
+ models = LLMSpecs.gemini # provider specific models
22
+ models = LLMSpecs.anthropic
23
+ models = LLMSpecs.openai
24
+ models = LLMSpecs.deepseek
20
25
  ```
21
26
 
22
27
  ### Find a model by ID
@@ -28,9 +33,13 @@ model = LLMSpecs.models.find("claude-3-sonnet")
28
33
  ```ruby
29
34
  # List all Anthropic models
30
35
  anthropic_models = LLMSpecs.models.where(provider: "anthropic")
36
+ # or
37
+ anthropic_models = LLMSpecs.anthropic
31
38
 
32
39
  # List all Anthropic models by family "claude-3-7-sonnet"
33
40
  claude_models = LLMSpecs.models.where(provider: "anthropic", family: "claude-3-7-sonnet")
41
+ #or
42
+ claude_models = LLMSpecs.anthropic.where(family: "claude-3-7-sonnet")
34
43
 
35
44
  # List all models that support streaming
36
45
  streaming_models = LLMSpecs.models.select(&:streaming?)
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module LLMSpecs
3
- VERSION = "0.1.8"
3
+ VERSION = "0.2.0"
4
4
  end
data/lib/llm_specs.rb CHANGED
@@ -20,5 +20,9 @@ module LLMSpecs
20
20
  def models
21
21
  @models ||= Catalog.new(api_uri: API_URI, cache_path: cache_path).models
22
22
  end
23
+
24
+ %i[anthropic deepseek gemini openai].each do |prov|
25
+ define_method(prov) { models.where(provider: prov.to_s) }
26
+ end
23
27
  end
24
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: llm_specs
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Power