Class: RubyLLM::Tokenizer::Analysis
- Inherits:
-
Struct
- Object
- Struct
- RubyLLM::Tokenizer::Analysis
- Defined in:
- lib/ruby_llm/tokenizer/analysis.rb
Instance Attribute Summary collapse
-
#ids ⇒ Object
Returns the value of attribute ids.
-
#model ⇒ Object
Returns the value of attribute model.
-
#tokens ⇒ Object
Returns the value of attribute tokens.
Instance Method Summary collapse
Instance Attribute Details
#ids ⇒ Object
Returns the value of attribute ids
5 6 7 |
# File 'lib/ruby_llm/tokenizer/analysis.rb', line 5 def ids @ids end |
#model ⇒ Object
Returns the value of attribute model
5 6 7 |
# File 'lib/ruby_llm/tokenizer/analysis.rb', line 5 def model @model end |
#tokens ⇒ Object
Returns the value of attribute tokens
5 6 7 |
# File 'lib/ruby_llm/tokenizer/analysis.rb', line 5 def tokens @tokens end |
Instance Method Details
#count ⇒ Object
6 7 8 |
# File 'lib/ruby_llm/tokenizer/analysis.rb', line 6 def count ids.size end |
#to_h ⇒ Object
10 11 12 |
# File 'lib/ruby_llm/tokenizer/analysis.rb', line 10 def to_h { tokens: tokens, ids: ids, model: model, count: count } end |