liter_llm 1.5.0 → 1.6.3
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/README.md +13 -12
- data/ext/liter_llm_rb/native/Cargo.lock +341 -84
- data/ext/liter_llm_rb/native/Cargo.toml +8 -2
- data/ext/liter_llm_rb/src/lib.rs +627 -1
- data/lib/liter_llm/native.rb +1 -1
- data/lib/liter_llm/version.rb +2 -2
- data/lib/liter_llm.rb +1 -1
- data/sig/types.rbs +54 -1
- metadata +5 -2
data/lib/liter_llm/native.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:0c694843abf5c6a9fc8b410dfa73aea7c94ee538a40dc746dd72c50e7c986f97
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
data/lib/liter_llm/version.rb
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:0c694843abf5c6a9fc8b410dfa73aea7c94ee538a40dc746dd72c50e7c986f97
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
|
6
6
|
|
|
7
7
|
module LiterLlm
|
|
8
8
|
## The version string for this package.
|
|
9
|
-
VERSION = "1.
|
|
9
|
+
VERSION = "1.6.3"
|
|
10
10
|
end
|
data/lib/liter_llm.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:0c694843abf5c6a9fc8b410dfa73aea7c94ee538a40dc746dd72c50e7c986f97
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
# frozen_string_literal: true
|
data/sig/types.rbs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# This file is auto-generated by alef — DO NOT EDIT.
|
|
2
|
-
# alef:hash:
|
|
2
|
+
# alef:hash:0c694843abf5c6a9fc8b410dfa73aea7c94ee538a40dc746dd72c50e7c986f97
|
|
3
3
|
# To regenerate: alef generate
|
|
4
4
|
# To verify freshness: alef verify --exit-code
|
|
5
5
|
|
|
@@ -651,6 +651,16 @@ module LiterLlm
|
|
|
651
651
|
def initialize: (?input_tokens: Integer, ?output_tokens: Integer, ?total_tokens: Integer) -> void
|
|
652
652
|
end
|
|
653
653
|
|
|
654
|
+
class WaitForBatchConfig
|
|
655
|
+
attr_accessor initial_interval_secs: Float?
|
|
656
|
+
attr_accessor max_interval_secs: Float?
|
|
657
|
+
attr_accessor backoff_multiplier: Float?
|
|
658
|
+
attr_accessor timeout_secs: Float?
|
|
659
|
+
|
|
660
|
+
def initialize: (?initial_interval_secs: Float, ?max_interval_secs: Float, ?backoff_multiplier: Float, ?timeout_secs: Float) -> void
|
|
661
|
+
def self.default: () -> WaitForBatchConfig
|
|
662
|
+
end
|
|
663
|
+
|
|
654
664
|
class DefaultClient
|
|
655
665
|
def chat: (ChatCompletionRequest req) -> ChatCompletionResponse
|
|
656
666
|
def chat_stream: (ChatCompletionRequest req) -> Enumerator[ChatStreamIterator]
|
|
@@ -672,6 +682,8 @@ module LiterLlm
|
|
|
672
682
|
def retrieve_batch: (String batch_id) -> BatchObject
|
|
673
683
|
def list_batches: (?BatchListQuery query) -> BatchListResponse
|
|
674
684
|
def cancel_batch: (String batch_id) -> BatchObject
|
|
685
|
+
def fetch_batch_for_polling: (String batch_id) -> BatchObject
|
|
686
|
+
def wait_for_batch: (String batch_id, WaitForBatchConfig config) -> BatchObject
|
|
675
687
|
def create_response: (CreateResponseRequest req) -> ResponseObject
|
|
676
688
|
def retrieve_response: (String response_id) -> ResponseObject
|
|
677
689
|
def cancel_response: (String response_id) -> ResponseObject
|
|
@@ -686,6 +698,18 @@ module LiterLlm
|
|
|
686
698
|
def initialize: (name: String, base_url: String, auth_header: AuthHeaderFormat, model_prefixes: Array[String]) -> void
|
|
687
699
|
end
|
|
688
700
|
|
|
701
|
+
class ProviderCapabilities
|
|
702
|
+
attr_accessor vision: bool?
|
|
703
|
+
attr_accessor reasoning: bool?
|
|
704
|
+
attr_accessor structured_output: bool?
|
|
705
|
+
attr_accessor function_calling: bool?
|
|
706
|
+
attr_accessor audio_in: bool?
|
|
707
|
+
attr_accessor audio_out: bool?
|
|
708
|
+
attr_accessor video_in: bool?
|
|
709
|
+
|
|
710
|
+
def initialize: (?vision: bool, ?reasoning: bool, ?structured_output: bool, ?function_calling: bool, ?audio_in: bool, ?audio_out: bool, ?video_in: bool) -> void
|
|
711
|
+
end
|
|
712
|
+
|
|
689
713
|
class ProviderConfig
|
|
690
714
|
attr_reader name: String
|
|
691
715
|
attr_reader display_name: String
|
|
@@ -723,6 +747,9 @@ module LiterLlm
|
|
|
723
747
|
def self.default: () -> CacheConfig
|
|
724
748
|
end
|
|
725
749
|
|
|
750
|
+
class SingleflightResult
|
|
751
|
+
end
|
|
752
|
+
|
|
726
753
|
class RateLimitConfig
|
|
727
754
|
attr_accessor rpm: Integer?
|
|
728
755
|
attr_accessor tpm: Integer?
|
|
@@ -732,6 +759,14 @@ module LiterLlm
|
|
|
732
759
|
def self.default: () -> RateLimitConfig
|
|
733
760
|
end
|
|
734
761
|
|
|
762
|
+
class IntentPrototype
|
|
763
|
+
attr_reader name: String
|
|
764
|
+
attr_reader embedding: Array[Float]
|
|
765
|
+
attr_reader model: String
|
|
766
|
+
|
|
767
|
+
def initialize: (name: String, embedding: Array[Float], model: String) -> void
|
|
768
|
+
end
|
|
769
|
+
|
|
735
770
|
class Message
|
|
736
771
|
end
|
|
737
772
|
|
|
@@ -797,6 +832,10 @@ module LiterLlm
|
|
|
797
832
|
class AuthHeaderFormat
|
|
798
833
|
end
|
|
799
834
|
|
|
835
|
+
class StreamFormat
|
|
836
|
+
type value = :sse | :aws_event_stream
|
|
837
|
+
end
|
|
838
|
+
|
|
800
839
|
class AuthType
|
|
801
840
|
type value = :bearer | :api_key | :none | :unknown
|
|
802
841
|
end
|
|
@@ -808,6 +847,14 @@ module LiterLlm
|
|
|
808
847
|
class CacheBackend
|
|
809
848
|
end
|
|
810
849
|
|
|
850
|
+
class CircuitState
|
|
851
|
+
type value = :closed | :open | :half_open
|
|
852
|
+
end
|
|
853
|
+
|
|
854
|
+
class HealthStatus
|
|
855
|
+
type value = :healthy | :unhealthy
|
|
856
|
+
end
|
|
857
|
+
|
|
811
858
|
def self.create_client: (String api_key, ?String base_url, ?Integer timeout_secs, ?Integer max_retries, ?String model_hint) -> DefaultClient
|
|
812
859
|
|
|
813
860
|
def self.create_client_from_json: (String json) -> DefaultClient
|
|
@@ -816,6 +863,8 @@ module LiterLlm
|
|
|
816
863
|
|
|
817
864
|
def self.unregister_custom_provider: (String name) -> bool
|
|
818
865
|
|
|
866
|
+
def self.capabilities: (String provider_name) -> ProviderCapabilities
|
|
867
|
+
|
|
819
868
|
def self.all_providers: () -> Array[ProviderConfig]
|
|
820
869
|
|
|
821
870
|
def self.complex_provider_names: () -> Array[String]
|
|
@@ -824,10 +873,14 @@ module LiterLlm
|
|
|
824
873
|
|
|
825
874
|
def self.completion_cost_with_cache: (String model, Integer prompt_tokens, Integer cached_tokens, Integer completion_tokens) -> Float?
|
|
826
875
|
|
|
876
|
+
def self.clear: () -> void
|
|
877
|
+
|
|
827
878
|
def self.count_tokens: (String model, String text) -> Integer
|
|
828
879
|
|
|
829
880
|
def self.count_request_tokens: (String model, ChatCompletionRequest req) -> Integer
|
|
830
881
|
|
|
882
|
+
def self.check_bound: (String context, Integer current_len, Integer incoming, Integer limit) -> void
|
|
883
|
+
|
|
831
884
|
def self.ensure_crypto_provider: () -> void
|
|
832
885
|
|
|
833
886
|
class LiterLlmErrorInfo
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: liter_llm
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.
|
|
4
|
+
version: 1.6.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Na'aman Hirschfeld
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-06-
|
|
11
|
+
date: 2026-06-16 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rb_sys
|
|
@@ -78,6 +78,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
78
78
|
- - ">="
|
|
79
79
|
- !ruby/object:Gem::Version
|
|
80
80
|
version: 3.2.0
|
|
81
|
+
- - "<"
|
|
82
|
+
- !ruby/object:Gem::Version
|
|
83
|
+
version: '4.0'
|
|
81
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
82
85
|
requirements:
|
|
83
86
|
- - ">="
|